Sha256: 4067308be000bf1807fd789715f094ea20123d68c0c654010e5cc15eb34c5b71
Contents?: true
Size: 1.02 KB
Versions: 16
Compression:
Stored size: 1.02 KB
Contents
describe('Alert', function() { var alertService; beforeEach(module('socialNetworking.services')); beforeEach(function() { inject(function($injector) { alertService = $injector.get('alertService'); }); }); describe('#addError', function() { it('adds an error alert to the alerts array', function() { expect(alertService.alerts).toEqual([]); alertService.addError("Big Peanut"); expect(alertService.alerts).toEqual([{ cssClass: "alert-danger", message: "Big Peanut" }]) }); }); describe('#getAlerts', function() { it('returns all alerts', function() { expect(alertService.getAlerts()).toEqual([]); alertService.alerts = ['foo'] expect(alertService.getAlerts()).toEqual(['foo']); }); }); describe('#removeAlert', function() { it('removes alert from array of alerts', function() { alertService.alerts = ['alert'] alertService.removeAlert('alert'); expect(alertService.alerts).toEqual([]); }); }); });
Version data entries
16 entries across 16 versions & 1 rubygems