                 expect(moveDialog.errorMessage.textContent).toContain 'already exists'
                 expect(moveDialog.element).toHaveClass('error')
                 expect(moveDialog.element.parentElement).toBeTruthy()
-                expect(handlers['entry-moved'][0].callCount).toBe 0
+                expect(callback).not.toHaveBeenCalled()
 
         describe "when 'core:cancel' is triggered on the move dialog", ->
           it "removes the dialog and focuses the tree view", ->

            LocalStorage['tree-view:copyPath'] = JSON.stringify([filePath])

          it "creates a copy of the original file in the selected file's parent directory", ->
            treeView.onEntryCopied ->
            spyOn(treeView.emitter.handlersByEventName['entry-copied'], '0')
            fileView2.dispatchEvent(new MouseEvent('click', {bubbles: true, detail: 1}))
            atom.commands.dispatch(treeView.element, "tree-view:paste")

            expect(fs.existsSync(path.join(dirPath2, path.basename(filePath)))).toBeTruthy()
            expect(fs.existsSync(filePath)).toBeTruthy()
            expect(treeView.emitter.handlersByEventName['entry-copied'][0].callCount).toEqual(1)

          describe "when the target already exists", ->
            it "appends a number to the destination name", ->


        describe "when the path is changed and confirmed", ->
          describe "when all the directories along the new path exist", ->
            it "moves the file, updates the tree view, closes the dialog, and emits an event", ->
              newPath = path.join(rootDirPath, 'renamed-test-file.txt')
              moveDialog.miniEditor.setText(path.basename(newPath))

