blob: e7412a86f24ab2cca7d3df2b1d2564f9b0f8363e [file] [log] [blame]
Steven Burrows202034f2017-08-11 12:08:01 +01001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 ONOS GUI -- Topo Controller - Unit Tests
19 */
20describe('Controller: OvTopoCtrl', function () {
21
22 var $scope, $controller, createController, d3Topo, d3Map;
23
24 beforeEach(module('ovTopo', 'onosRemote', 'onosLayer', 'onosSvg',
25 'onosNav', 'ngRoute', 'onosWidget', 'onosMast'));
26
27 beforeEach(inject(function ($rootScope, _$controller_) {
28 $scope = $rootScope.$new();
29 $controller = _$controller_;
30
31 d3Topo = d3.select('body').append('div').attr('id', 'ov-topo');
32 d3Topo.append('svg');
33
Steven Burrows4b4d2b42017-08-16 14:11:23 +010034 d3.select('body').append('div').attr('id', 'topo-p-summary');
35 d3.select('body').append('div').attr('id', 'topo-p-details');
36
Steven Burrows202034f2017-08-11 12:08:01 +010037 createController = function () {
38 return $controller('OvTopoCtrl', {
39 '$scope': $scope,
40 });
41 };
42 }));
43
44 afterEach(function () {
45 d3.select('#ov-topo').remove();
46 d3.select('#ov-map').remove();
47 });
48
49 it('should create controller', function () {
50 var controller = createController();
51 });
52
53});