blob: cb7fcde8573bde3dea7f1c268169b33de3d0031b [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
34 createController = function () {
35 return $controller('OvTopoCtrl', {
36 '$scope': $scope,
37 });
38 };
39 }));
40
41 afterEach(function () {
42 d3.select('#ov-topo').remove();
43 d3.select('#ov-map').remove();
44 });
45
46 it('should create controller', function () {
47 var controller = createController();
48 });
49
50});