Sha256: 078fefb5e1738b8b2002c81fcb53c63003914201006e7474a8b3a4def4bbc9cf

Contents?: true

Size: 1.21 KB

Versions: 35

Compression:

Stored size: 1.21 KB

Contents

describe('Directive: bstGlobalNotification', function () {
    var $scope, $compile, PageTitle;

    beforeEach(module(
        'ngSanitize',
        'Bastion.components', 
        'components/views/bst-global-notification.html',
        'components/views/bst-alert.html', 
        'components/views/bst-alerts.html'
    ));

    beforeEach(inject(function(_$compile_, _$rootScope_, _GlobalNotification_) {
        $compile = _$compile_;
        $scope = _$rootScope_;
        GlobalNotification = _GlobalNotification_;
    }));

    beforeEach(function () {
        element = angular.element('<div bst-global-notification></div>');
        $compile(element)($scope);
        $scope.$digest();
    });

    it("should display an error message", function () {
        errorMessage = "Something is wrong!!";
        GlobalNotification.setErrorMessage(errorMessage);

        $scope.$digest();
        expect(element.html().indexOf(errorMessage)).toBeGreaterThan(0);
    });

    it("should display a success message", function () {
        successMessage = "success!!";
        GlobalNotification.setSuccessMessage(successMessage);

        $scope.$digest();
        expect(element.html().indexOf(successMessage)).toBeGreaterThan(0);
    });
});

Version data entries

35 entries across 35 versions & 1 rubygems

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