Commit dc249cf9 by Torkel Ödegaard

fixed unit tests

parent 011c582e
...@@ -19,7 +19,8 @@ var backendSrv = { ...@@ -19,7 +19,8 @@ var backendSrv = {
ctx.ctrl = $controller(UserGroupDetailsCtrl, { ctx.ctrl = $controller(UserGroupDetailsCtrl, {
$scope: ctx.scope, $scope: ctx.scope,
backendSrv: backendSrv, backendSrv: backendSrv,
$routeParams: {id: 1} $routeParams: {id: 1},
navModelSrv: {getNav: sinon.stub()}
}); });
})); }));
......
...@@ -6,7 +6,9 @@ describe('PlaylistEditCtrl', () => { ...@@ -6,7 +6,9 @@ describe('PlaylistEditCtrl', () => {
var ctx: any; var ctx: any;
beforeEach(() => { beforeEach(() => {
let navModelSrv = { let navModelSrv = {
getPlaylistsNav: page => {}, getNav: () => {
return { breadcrumbs: [], node: {}};
},
}; };
ctx = new PlaylistEditCtrl(null, null, null, null, { current: { params: {} } }, navModelSrv); ctx = new PlaylistEditCtrl(null, null, null, null, { current: { params: {} } }, navModelSrv);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
baseURL: '/base/', baseURL: '/base/',
defaultJSExtensions: true, defaultJSExtensions: true,
paths: { paths: {
'gemini-scrollbar': 'vendor/npm/gemini-scrollbar/index.js',
'mousetrap': 'vendor/npm/mousetrap/mousetrap.js', 'mousetrap': 'vendor/npm/mousetrap/mousetrap.js',
'eventemitter3': 'vendor/npm/eventemitter3/index.js', 'eventemitter3': 'vendor/npm/eventemitter3/index.js',
'remarkable': 'vendor/npm/remarkable/dist/remarkable.js', 'remarkable': 'vendor/npm/remarkable/dist/remarkable.js',
......
...@@ -24,6 +24,7 @@ module.exports = function(config, grunt) { ...@@ -24,6 +24,7 @@ module.exports = function(config, grunt) {
gaze([ gaze([
config.srcDir + '/sass/**/*', config.srcDir + '/sass/**/*',
config.srcDir + '/app/**/*', config.srcDir + '/app/**/*',
config.srcDir + '/test/**/*',
config.srcDir + '/vendor/npm/gemini-scrollbar/*.js', config.srcDir + '/vendor/npm/gemini-scrollbar/*.js',
], function(err, watcher) { ], function(err, watcher) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment