mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
💄
This commit is contained in:
@@ -299,16 +299,12 @@ describe "WorkspaceView", ->
|
||||
describe "saving the active item", ->
|
||||
describe "saveActivePaneItem", ->
|
||||
describe "when there is an error", ->
|
||||
beforeEach ->
|
||||
|
||||
it "emits a warning notification when the file cannot be saved", ->
|
||||
spyOn(Pane::, 'saveActiveItem').andCallFake ->
|
||||
throw new Error("'/some/file' is a directory")
|
||||
|
||||
atom.notifications.onDidAddNotification addedSpy = jasmine.createSpy()
|
||||
|
||||
atom.workspace.saveActivePaneItem()
|
||||
|
||||
expect(addedSpy).toHaveBeenCalled()
|
||||
expect(addedSpy.mostRecentCall.args[0].getType()).toBe 'warning'
|
||||
|
||||
@@ -317,7 +313,6 @@ describe "WorkspaceView", ->
|
||||
throw new Error("ENOTDIR, not a directory '/Some/dir/and-a-file.js'")
|
||||
|
||||
atom.notifications.onDidAddNotification addedSpy = jasmine.createSpy()
|
||||
|
||||
atom.workspace.saveActivePaneItem()
|
||||
expect(addedSpy).toHaveBeenCalled()
|
||||
expect(addedSpy.mostRecentCall.args[0].getType()).toBe 'warning'
|
||||
|
||||
Reference in New Issue
Block a user