       expect(lines.hasClass 'conflict-theirs').toBe(true)
 
     it 'applies the "dirty" class to modified sides', ->
-      editor = editorView.getEditor()
+      editor = editorView.getModel()
       editor.setCursorBufferPosition [14, 0]
       editor.insertText "Make conflict 1 dirty"
       detectDirty()

      atom.on 'merge-conflicts:resolved', (e) -> event = e
      m.conflicts[2].theirs.resolve()

      expect(event.file).toBe(editorView.getEditor().getPath())
      expect(event.total).toBe(3)
      expect(event.resolved).toBe(1)
      expect(event.source).toBe(m)

    it 'tracks the active conflict side', ->
      editorView.getEditor().setCursorBufferPosition [11, 0]
      expect(m.active()).toEqual([])
      editorView.getEditor().setCursorBufferPosition [14, 5]
      expect(m.active()).toEqual([m.conflicts[1].ours])

    describe 'with an active merge conflict', ->

        active = m.conflicts[1]

      it 'accepts the current side with merge-conflicts:accept-current', ->
        atom.commands.dispatch editorView, 'merge-conflicts:accept-current'
        expect(active.resolution).toBe(active.ours)

      it "does nothing if you have cursors in both sides", ->
        editor.addCursorAtBufferPosition [16, 2]
        atom.commands.dispatch editorView, 'merge-conflicts:accept-current'
        expect(active.resolution).toBeNull()

      it 'accepts "ours" on merge-conflicts:accept-ours', ->
        atom.commands.dispatch editorView, 'merge-conflicts:accept-current'
        expect(active.resolution).toBe(active.ours)

      it 'accepts "theirs" on merge-conflicts:accept-theirs', ->
        atom.commands.dispatch editorView, 'merge-conflicts:accept-theirs'
        expect(active.resolution).toBe(active.theirs)

      it 'jumps to the next unresolved on merge-conflicts:next-unresolved', ->
        atom.commands.dispatch editorView, 'merge-conflicts:next-unresolved'
        expect(cursors()).toEqual([[22, 0]])

      it 'jumps to the previous unresolved on merge-conflicts:previous-unresolved', ->
        atom.commands.dispatch editorView, 'merge-conflicts:previous-unresolved'
        expect(cursors()).toEqual([[5, 0]])

      it 'reverts a dirty hunk on merge-conflicts:revert-current', ->
