Update editor height change spec

This commit is contained in:
Corey Johnson 2014-06-17 13:26:56 -07:00
parent 9e6756ed6d
commit c06f5911c6

View File

@ -1271,11 +1271,16 @@ describe "EditorComponent", ->
describe "when the editor component is resized", ->
it "updates the size in the editor model", ->
spyOn(editor, 'setHeight').andCallThrough()
originalHeight = editor.getHeight()
fourLinesHeight = 4 * editor.getLineHeightInPixels()
node.style.height = "#{originalHeight - fourLinesHeight}px"
component.forceUpdate()
expect(editor.getHeight()).not.toBe originalHeight
waitsFor ->
editor.setHeight.callCount > 0
runs ->
expect(editor.getHeight()).not.toBe originalHeight
buildMouseEvent = (type, properties...) ->
properties = extend({bubbles: true, cancelable: true}, properties...)