Merge "Revert "LocationProvider should be set up on the Horizon App""

This commit is contained in:
Jenkins 2016-01-07 19:06:13 +00:00 committed by Gerrit Code Review
commit 7a1e069af4
2 changed files with 29 additions and 67 deletions

View File

@ -61,17 +61,8 @@
.concat(horizonBuiltInModules)
.concat(horizonPlugInModules)
)
.config(configHorizon)
.run(updateHorizon);
configHorizon.$inject = [
'$locationProvider'
];
function configHorizon($locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
}
updateHorizon.$inject = [
'gettextCatalog',
'horizon.framework.conf.spinner_options',
@ -87,8 +78,7 @@
hzUtils,
$cookieStore,
$http,
$cookies
) {
$cookies) {
$http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken;

View File

@ -22,32 +22,4 @@
});
});
describe('$locationProvider', function() {
var $locationProvider;
beforeEach(function() {
angular.module('horizon.auth', []);
angular.module('locationProviderConfig', [])
.config(function(_$locationProvider_) {
$locationProvider = _$locationProvider_;
spyOn($locationProvider, 'html5Mode').and.callThrough();
spyOn($locationProvider, 'hashPrefix').and.callThrough();
});
module('locationProviderConfig');
module('horizon.app');
inject();
});
it('should set html5 mode', function() {
expect($locationProvider.html5Mode).toHaveBeenCalledWith(true);
});
it('should set hashPrefix', function() {
expect($locationProvider.hashPrefix).toHaveBeenCalledWith('!');
});
});
})();