From ad67ad1c06948fd0cb0c9c4cb84426576372d8ab Mon Sep 17 00:00:00 2001 From: Peter Piela Date: Wed, 11 May 2016 18:38:15 -0400 Subject: [PATCH] Fixed node-detail controller unit test Jasmine tests for the node-detail controller started failing after recent functionality updates. Change-Id: Ia7106dfcdcc892c2bf9801ed43ca6b3e9ca78cc4 --- .../node-details.controller.spec.js | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.controller.spec.js b/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.controller.spec.js index 6687e9ef..091197b1 100755 --- a/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.controller.spec.js +++ b/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.controller.spec.js @@ -56,8 +56,14 @@ beforeEach(module('horizon.dashboard.admin.ironic')); - beforeEach(module('horizon.app.core.openstack-service-api', function($provide) { - $provide.value('horizon.app.core.openstack-service-api.ironic', ironicAPI); + beforeEach(module(function($provide) { + $provide.value('horizon.app.core.openstack-service-api.ironic', + ironicAPI); + })); + + beforeEach(module(function($provide) { + $provide.value('horizon.dashboard.admin.ironic.maintenance.service', + {}); })); beforeEach(inject(function ($injector, _$rootScope_, _$location_) { @@ -67,11 +73,11 @@ var $location = _$location_; $location.path('/admin/ironic/' + nodeUuid + '/'); - ctrl = controller('horizon.dashboard.admin.ironic.NodeDetailsController', { - $scope: scope, - $location: $location, - 'horizon.dashboard.admin.ironic.actions': {}, - 'horizon.dashboard.admin.basePath': '/static'}); + ctrl = controller( + 'horizon.dashboard.admin.ironic.NodeDetailsController', + {$location: $location, + 'horizon.dashboard.admin.ironic.actions': {}, + 'horizon.dashboard.admin.basePath': '/static'}); scope.$apply(); }));