sebdet | e442200 | 2018-10-16 17:47:54 +0200 | [diff] [blame] | 1 | require('jquery/dist/jquery.min.js'); |
| 2 | require('angular/angular.min.js'); |
| 3 | require('angular-mocks/angular-mocks.js'); |
| 4 | require('angular-route/angular-route.min.js'); |
| 5 | require('angular-resource/angular-resource.min.js'); |
| 6 | require('angular-cookies/angular-cookies.min.js'); |
| 7 | require('angular-animate/angular-animate.min.js'); |
| 8 | require('angular-sanitize/angular-sanitize.min.js'); |
| 9 | require('angular-touch/angular-touch.min.js'); |
| 10 | require('popper.js/dist/umd/popper.min.js'); |
| 11 | require('bootstrap/dist/js/bootstrap.min.js'); |
| 12 | require('angular-ui-bootstrap/dist/ui-bootstrap-tpls.js'); |
| 13 | require('angular-loading-bar/src/loading-bar.js'); |
| 14 | require('angular-dialog-service/dist/dialogs.js'); |
| 15 | require('scripts/app.js'); |
| 16 | require('scripts/DashboardCtrl.js'); |
| 17 | |
| 18 | |
| 19 | describe('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 | }); |