Adding tests for ng identity basePath constant
This patch improves test coverage for the agular identity dashboard by adding tests for the basePath constant definition. A minor consistency issue in the module file is also addressed. Change-Id: I97d0ce728e44777635bf6590e312fb00d1684582 Partially-Implements: blueprint angularize-identity-tables
This commit is contained in:
parent
03b4c9ffb8
commit
859195d44c
@ -31,7 +31,10 @@
|
|||||||
])
|
])
|
||||||
.config(config);
|
.config(config);
|
||||||
|
|
||||||
config.$inject = ['$provide', '$windowProvider'];
|
config.$inject = [
|
||||||
|
'$provide',
|
||||||
|
'$windowProvider'
|
||||||
|
];
|
||||||
|
|
||||||
function config($provide, $windowProvider) {
|
function config($provide, $windowProvider) {
|
||||||
var path = $windowProvider.$get().STATIC_URL + 'dashboard/identity/';
|
var path = $windowProvider.$get().STATIC_URL + 'dashboard/identity/';
|
||||||
|
@ -22,4 +22,18 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('horizon.dashboard.identity.basePath constant', function() {
|
||||||
|
var identityBasePath, staticUrl;
|
||||||
|
|
||||||
|
beforeEach(module('horizon.dashboard.identity'));
|
||||||
|
beforeEach(inject(function($injector) {
|
||||||
|
identityBasePath = $injector.get('horizon.dashboard.identity.basePath');
|
||||||
|
staticUrl = $injector.get('$window').STATIC_URL;
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should equal to "/static/dashboard/identity/"', function() {
|
||||||
|
expect(identityBasePath).toEqual(staticUrl + 'dashboard/identity/');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user