         bookmarks.find('.bookmark').mousedown().mouseup()
 
         waitsFor ->
-         editSession.getCursorBufferPosition().isEqual([8, 0])
+         editor.getCursorBufferPosition().isEqual([8, 0])


    describe "when a bookmark is selected", ->
      it "sets the cursor to the location the bookmark", ->
        editSession.setCursorBufferPosition([8])
        editor.trigger 'bookmarks:toggle-bookmark'
        editSession.setCursorBufferPosition([0])

        atom.workspaceView.trigger 'bookmarks:view-all'


{WorkspaceView} = require 'atom'

describe "Bookmarks package", ->
  [editorView, editor, displayBuffer] = []

  beforeEach ->
    atom.workspaceView = new WorkspaceView
