From 5220939cc89009be287f9eaf1f062cfe93a619bb Mon Sep 17 00:00:00 2001 From: Xinni Ge Date: Fri, 1 Dec 2017 21:55:01 +0900 Subject: [PATCH] Remove unnecessary `$locationProvider` settings $locationProvider is not used in current implementation. Delete related codes including unittest. Change-Id: I1d2b3540fe151c6a06dfc037f86e33241035d003 --- .../components/template-generator.module.js | 7 ------- .../template-generator.module.spec.js | 19 ------------------- 2 files changed, 26 deletions(-) diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.js b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.js index 24ccbafe..365ffa9c 100644 --- a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.js +++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.js @@ -13,13 +13,6 @@ .warnPalette('red') ; }]) - .config(['$locationProvider', function($locationProvider) { - $locationProvider.html5Mode({ - enabled: true, - requireBase: false, - rewriteLinks: false, - }); - }]) .config(['$provide', '$windowProvider', function($provide, $windowProvider){ var project_window = $windowProvider.$get(); var staticPath = project_window.STATIC_URL + 'dashboard/project/heat_dashboard/template_generator/'; diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.spec.js b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.spec.js index 0e484cf1..83469898 100644 --- a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.spec.js +++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/template-generator.module.spec.js @@ -20,23 +20,4 @@ ); }); - describe('horizon.dashboard.project.heat_dashboard.template_generator $locationProvider config', function () { - var $locationProvider; - beforeEach(function () { - angular.module('locationProviderConfig', []) - .config(function(_$locationProvider_) { - $locationProvider= _$locationProvider_; - spyOn($locationProvider, 'html5Mode'); - }); - module('locationProviderConfig'); - module('horizon.dashboard.project.heat_dashboard.template_generator'); - inject(); - }); - - it('should set html5 mode', function() { - expect($locationProvider.html5Mode) - .toHaveBeenCalledWith({ enabled: true, requireBase: false, rewriteLinks: false }); - }); - - }); })();