blob: 99761907343bb6fedb44491dd88f404c4bc62561 [file] [log] [blame]
Matteo Scandolo6bc31bf2016-08-29 10:17:31 -07001'use strict';
2
3describe('The MCORD Slicing Topology', () => {
4
5 var scope, element, isolatedScope, httpBackend;
6
7 beforeEach(module('xos.mcord-slicing'));
8 beforeEach(module('templates'));
9
10 beforeEach(inject(function($httpBackend, $compile, $rootScope){
11
12 httpBackend = $httpBackend;
13 // Setting up mock request
14 $httpBackend.expectGET('api/service/mcord_slicing_ui/topology/?no_hyperlinks=1').respond([
15 {
16 email: 'matteo.scandolo@gmail.com',
17 firstname: 'Matteo',
18 lastname: 'Scandolo'
19 }
20 ]);
21
22 scope = $rootScope.$new();
23 element = angular.element('<slicing-topo></slicing-topo>');
24 $compile(element)(scope);
25 scope.$digest();
26 isolatedScope = element.isolateScope().vm;
27 }));
28
29 xit('should create 1 svg', () => {
30 httpBackend.flush();
31 let svg = $(element).find('svg');
32 expect(svg.length).toBe(1);
33 });
34
35});