diff --git a/magnum_ui/karma.conf.js b/magnum_ui/karma.conf.js index 19c7cf0e..72b5ed62 100644 --- a/magnum_ui/karma.conf.js +++ b/magnum_ui/karma.conf.js @@ -65,6 +65,8 @@ module.exports = function (config) { toxPath + 'xstatic/pkg/tv4/data/tv4.js', toxPath + 'xstatic/pkg/objectpath/data/ObjectPath.js', toxPath + 'xstatic/pkg/angular_schema_form/data/schema-form.js', + toxPath + 'xstatic/pkg/angular_fileupload/data/ng-file-upload.js', + // TODO: These should be mocked. toxPath + '/horizon/static/horizon/js/horizon.js', diff --git a/magnum_ui/static/dashboard/container-infra/magnum.service.spec.js b/magnum_ui/static/dashboard/container-infra/magnum.service.spec.js new file mode 100644 index 00000000..7a1b1fb8 --- /dev/null +++ b/magnum_ui/static/dashboard/container-infra/magnum.service.spec.js @@ -0,0 +1,35 @@ +/* + * (c) Copyright 2016 NEC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function() { + 'use strict'; + + describe('Magnum API', function() { + var service; + + beforeEach(module('horizon.framework')); + beforeEach(module('horizon.app.core.openstack-service-api')); + + beforeEach(inject(['horizon.app.core.openstack-service-api.magnum', function(magnumAPI) { + service = magnumAPI; + }])); + + it('defines the service', function() { + expect(service).toBeDefined(); + }); + }); + +})();