Sha256: 0dea3a6f3f40ce17990881fb63dc4e4559b5c05b2f203e25fd3ceeeafea96558
Contents?: true
Size: 1.25 KB
Versions: 7
Compression:
Stored size: 1.25 KB
Contents
describe("Factory Notification", function() { var service; var message; beforeEach(function(){ module('keysServices'); inject(function(Notification){ service = Notification; }); message = "Some random message"; }); describe("alert method", function(){ it("notificates the user with an alert", function(){ noty = jasmine.createSpy('noty'); service.alert(message); expect(noty).toHaveBeenCalledWith({text: message, type: 'alert'}); }); }); describe("error method", function(){ it("notificates the user with an error", function(){ noty = jasmine.createSpy('noty'); service.error(message); expect(noty).toHaveBeenCalledWith({text: message, type: 'error'}); }); }); describe("info method", function(){ it("notificates the user with an info", function(){ noty = jasmine.createSpy('noty'); service.info(message); expect(noty).toHaveBeenCalledWith({text: message, type: 'information'}); }); }); describe("success method", function(){ it("notificates the user with as success", function(){ noty = jasmine.createSpy('noty'); service.success(message); expect(noty).toHaveBeenCalledWith({text: message, type: 'success'}); }); }); });
Version data entries
7 entries across 7 versions & 1 rubygems