blob: c088957f9596e9f044ab7391baeefe3e49013e72 [file] [log] [blame]
sebdete4422002018-10-16 17:47:54 +02001require('jquery/dist/jquery.min.js');
2require('angular/angular.min.js');
3require('angular-mocks/angular-mocks.js');
4require('angular-route/angular-route.min.js');
5require('angular-resource/angular-resource.min.js');
6require('angular-cookies/angular-cookies.min.js');
7require('angular-animate/angular-animate.min.js');
8require('angular-sanitize/angular-sanitize.min.js');
9require('angular-touch/angular-touch.min.js');
10require('popper.js/dist/umd/popper.min.js');
11require('bootstrap/dist/js/bootstrap.min.js');
12require('angular-ui-bootstrap/dist/ui-bootstrap-tpls.js');
13require('angular-loading-bar/src/loading-bar.js');
14require('angular-dialog-service/dist/dialogs.js');
15require('scripts/app.js');
16require('scripts/DashboardCtrl.js');
17
18
19describe('Dashboard ctrl tests', function() {
20
21 beforeEach(angular.mock.module('clds-app'));
22
23 var $controllerService;
24
25 beforeEach(angular.mock.inject(function(_$controller_) {
26 $controllerService = _$controller_;
27 }));
28
29 describe('$scope.showPalette', function() {
30
31 it('test showPalette', function() {
32
33 var $scopeTest = {};
34 var $rootScopeTest = {};
35 var $resourceTest = {};
36 var $httpTest = {};
37 var $timeoutTest = {};
38 var $locationTest = {};
39 var $intervalTest = function(){};
40 var $controllerDashboard = $controllerService('DashboardCtrl', {
41 '$scope' : $scopeTest,
42 '$rootScope' : $rootScopeTest,
43 '$resource' : $resourceTest,
44 '$http' : $httpTest,
45 '$timeout' : $timeoutTest,
46 '$location' : $locationTest,
47 '$interval' : $intervalTest
48 });
49 $scopeTest.showPalette();
50 expect($rootScopeTest.isModel).toEqual(true);
51 });
52 });
53});