Make sure showing success dialogs works correctly

This commit is contained in:
Antonio Scandurra
2015-11-11 18:19:32 +01:00
committed by Nathan Sobo
parent 780979e122
commit cc30daa617

View File

@@ -43,6 +43,19 @@ describe "CommandInstaller on #darwin", ->
detailedMessage: "another error"
})
it "shows a success dialog when installing commands interactively succeeds", ->
appDelegate = jasmine.createSpyObj("appDelegate", ["confirm"])
installer = new CommandInstaller("2.0.2", appDelegate)
spyOn(installer, "installAtomCommand").andCallFake (__, callback) -> callback()
spyOn(installer, "installApmCommand").andCallFake (__, callback) -> callback()
installer.installShellCommandsInteractively()
expect(appDelegate.confirm).toHaveBeenCalledWith({
message: "Commands installed."
detailedMessage: "The shell commands `atom` and `apm` are installed."
})
describe "when using a stable version of atom", ->
beforeEach ->
installer = new CommandInstaller("2.0.2")