Skip to content

Commit

Permalink
chore(): update info test to also spyOn getIonicAppScriptsVersion.
Browse files Browse the repository at this point in the history
  • Loading branch information
jthoms1 committed Oct 18, 2016
1 parent b8e9023 commit 5ee6657
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/tasks/info.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ describe('info command', function() {
expect(appLibInfo.checkRuntime).not.toHaveBeenCalled();
});

it('should fail if any Info task throws', function() {
it('should gather info', function() {
var gatheredInfo = { info: 'hi' };
spyOn(appLibUtils, 'fail');
spyOn(process, 'cwd').andReturn('/hello/how/areyou');
spyOn(appLibInfo, 'gatherInfo').andReturn(gatheredInfo);
spyOn(appLibInfo, 'getIonicVersion');
spyOn(appLibInfo, 'getIonicCliVersion');
spyOn(appLibInfo, 'getIonicAppScriptsVersion');
spyOn(appLibInfo, 'printInfo');
spyOn(appLibInfo, 'checkRuntime');

Expand All @@ -62,6 +63,7 @@ describe('info command', function() {
expect(appLibInfo.gatherInfo).toHaveBeenCalled();
expect(appLibInfo.getIonicVersion).toHaveBeenCalledWith(gatheredInfo, '/hello/how/areyou');
expect(appLibInfo.getIonicCliVersion).toHaveBeenCalledWith(gatheredInfo, jasmine.any(String));
expect(appLibInfo.getIonicAppScriptsVersion).toHaveBeenCalledWith(gatheredInfo, '/hello/how/areyou');
expect(appLibInfo.printInfo).toHaveBeenCalledWith(gatheredInfo);
expect(appLibInfo.checkRuntime).toHaveBeenCalled();

Expand Down

0 comments on commit 5ee6657

Please sign in to comment.