|
@@ -10,7 +10,7 @@ define([
|
|
|
var ctx = new helpers.ServiceTestContext();
|
|
var ctx = new helpers.ServiceTestContext();
|
|
|
|
|
|
|
|
beforeEach(module('grafana.services'));
|
|
beforeEach(module('grafana.services'));
|
|
|
- beforeEach(ctx.providePhase(['datasourceSrv', 'timeSrv', 'templateSrv']));
|
|
|
|
|
|
|
+ beforeEach(ctx.providePhase(['datasourceSrv', 'timeSrv', 'templateSrv', "$routeParams"]));
|
|
|
beforeEach(ctx.createService('templateValuesSrv'));
|
|
beforeEach(ctx.createService('templateValuesSrv'));
|
|
|
|
|
|
|
|
describe('update interval variable options', function() {
|
|
describe('update interval variable options', function() {
|
|
@@ -27,6 +27,20 @@ define([
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ describe.only('should init values', function() {
|
|
|
|
|
+ var variables = [
|
|
|
|
|
+ { name: 'test', current: { value: 'hej' }}
|
|
|
|
|
+ ];
|
|
|
|
|
+ var dashboard = { templating: { list: variables } };
|
|
|
|
|
+
|
|
|
|
|
+ beforeEach(function() {
|
|
|
|
|
+ ctx.service.init(dashboard);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ it('should update options array', function() {
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
function describeUpdateVariable(desc, fn) {
|
|
function describeUpdateVariable(desc, fn) {
|
|
|
describe(desc, function() {
|
|
describe(desc, function() {
|
|
|
var scenario = {};
|
|
var scenario = {};
|