Skip to content

Commit

Permalink
fix(tests): fixed unit test broken in recent dynamic dashboard fix
Browse files Browse the repository at this point in the history
  • Loading branch information
torkelo committed Aug 1, 2016
1 parent a9cf7cd commit a4d2708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/app/features/dashboard/dynamic_dashboard_srv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class DynamicDashboardSrv {
if (dashboard.templating.list.length === 0) { return; }

this.dashboard = dashboard;
this.iteration = new Date().getTime();
this.iteration = (this.iteration || new Date().getTime()) + 1;

var cleanUpOnly = options.cleanUpOnly;

Expand Down
3 changes: 2 additions & 1 deletion public/test/specs/dynamicDashboardSrv-specs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define([
'app/features/dashboard/dynamicDashboardSrv',
'app/features/dashboard/dynamic_dashboard_srv',
'app/features/dashboard/dashboardSrv'
], function() {
'use strict';
Expand All @@ -12,6 +12,7 @@ define([
ctx.setup = function (setupFunc) {

beforeEach(module('grafana.services'));
beforeEach(module('grafana.core'));
beforeEach(module(function($provide) {
$provide.value('contextSrv', {
user: { timezone: 'utc'}
Expand Down

0 comments on commit a4d2708

Please sign in to comment.