This commit is contained in:
Kevin Sawicki
2012-09-28 18:41:44 -07:00
parent d69e08a858
commit 12a30873cf

View File

@@ -1591,15 +1591,13 @@ describe "Editor", ->
describe "when there is no wrapping", ->
it "highlights the line where the initial cursor position is", ->
{ row, column } = editor.getCursorBufferPosition()
expect(row).toBe 0
expect(editor.getCursorBufferPosition().row).toBe 0
expect(editor.find('.line-number.cursor-line-number').length).toBe 1
expect(editor.find('.line-number.cursor-line-number').text()).toBe "1"
it "updates the highlighted line when the cursor position changes", ->
editor.setCursorBufferPosition([1,0])
{ row, column } = editor.getCursorBufferPosition()
expect(row).toBe 1
expect(editor.getCursorBufferPosition().row).toBe 1
expect(editor.find('.line-number.cursor-line-number').length).toBe 1
expect(editor.find('.line-number.cursor-line-number').text()).toBe "2"
@@ -1610,15 +1608,13 @@ describe "Editor", ->
setEditorWidthInChars(editor, 20)
it "highlights the line where the initial cursor position is", ->
{ row, column } = editor.getCursorBufferPosition()
expect(row).toBe 0
expect(editor.getCursorBufferPosition().row).toBe 0
expect(editor.find('.line-number.cursor-line-number').length).toBe 1
expect(editor.find('.line-number.cursor-line-number').text()).toBe "1"
it "updates the highlighted line when the cursor position changes", ->
editor.setCursorBufferPosition([1,0])
{ row, column } = editor.getCursorBufferPosition()
expect(row).toBe 1
expect(editor.getCursorBufferPosition().row).toBe 1
expect(editor.find('.line-number.cursor-line-number').length).toBe 1
expect(editor.find('.line-number.cursor-line-number').text()).toBe "2"