Sha256: e774f4ec82e8113880709a742ad22f6f5b288a8b8afd263b40c03a02646f4e7c

Contents?: true

Size: 1.53 KB

Versions: 35

Compression:

Stored size: 1.53 KB

Contents

describe('Factory: GlobalNofification', function() {
    beforeEach(module('Bastion.components'));

    beforeEach(inject(function (_GlobalNotification_) {
        GlobalNotification = _GlobalNotification_;
    }));

   it("provides a way to set error messages", function () {
        errorMessage = "Everything is broken!";
        GlobalNotification.setErrorMessage(errorMessage);
        expect(GlobalNotification.errorMessages.length).toBe(1);
        expect(GlobalNotification.errorMessages[0]).toBe(errorMessage);
    });

    it("provides a way to set success messages", function () {
        successMessage = "Everything ran correctly!";
        GlobalNotification.setSuccessMessage(successMessage);
        expect(GlobalNotification.successMessages.length).toBe(1);
        expect(GlobalNotification.successMessages[0]).toBe(successMessage);
    });

    it("provides a way to set rendered error messages", function () {
        errorMessage = "Everything is broken!";
        GlobalNotification.setRenderedErrorMessage(errorMessage);
        expect(GlobalNotification.errorMessages.length).toBe(1);
        expect(GlobalNotification.errorMessages[0]['message']).toBe(errorMessage);
    });

    it("provides a way to set rendered success messages", function () {
        successMessage = "Everything ran correctly!";
        GlobalNotification.setRenderedSuccessMessage(successMessage);
        expect(GlobalNotification.successMessages.length).toBe(1);
        expect(GlobalNotification.successMessages[0]['message']).toBe(successMessage);
    })
});

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
bastion-5.1.1 test/components/global-notification.service.test.js
bastion-5.1.0 test/components/global-notification.service.test.js
bastion-5.0.10 test/components/global-notification.service.test.js
bastion-5.0.9 test/components/global-notification.service.test.js
bastion-5.0.8 test/components/global-notification.service.test.js
bastion-5.0.7 test/components/global-notification.service.test.js
bastion-5.0.6 test/components/global-notification.service.test.js
bastion-5.0.5 test/components/global-notification.service.test.js
bastion-5.0.4 test/components/global-notification.service.test.js
bastion-5.0.3 test/components/global-notification.service.test.js
bastion-5.0.2 test/components/global-notification.service.test.js
bastion-5.0.1 test/components/global-notification.service.test.js
bastion-5.0.0 test/components/global-notification.service.test.js
bastion-4.3.1 test/components/global-notification.service.test.js
bastion-4.3.0 test/components/global-notification.service.test.js
bastion-4.2.2 test/components/global-notification.service.test.js
bastion-4.2.1 test/components/global-notification.service.test.js
bastion-4.2.0 test/components/global-notification.service.test.js
bastion-4.1.0 test/components/global-notification.service.test.js
bastion-4.0.0 test/components/global-notification.service.test.js