mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Specs for the eacces error
This commit is contained in:
@@ -319,7 +319,15 @@ describe "WorkspaceView", ->
|
||||
atom.notifications.onDidAddNotification addedSpy = jasmine.createSpy()
|
||||
|
||||
atom.workspace.saveActivePaneItem()
|
||||
expect(addedSpy).toHaveBeenCalled()
|
||||
expect(addedSpy.mostRecentCall.args[0].getType()).toBe 'warning'
|
||||
|
||||
it "emits a warning notification when the user does not have permission", ->
|
||||
spyOn(Pane::, 'saveActiveItem').andCallFake ->
|
||||
throw new Error("EACCES, permission denied '/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