From cc30daa617bbbbb745ccf689b37c73209664200e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 11 Nov 2015 18:19:32 +0100 Subject: [PATCH] Make sure showing success dialogs works correctly --- spec/command-installer-spec.coffee | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/command-installer-spec.coffee b/spec/command-installer-spec.coffee index 221da3a8b..84fd77a34 100644 --- a/spec/command-installer-spec.coffee +++ b/spec/command-installer-spec.coffee @@ -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")