fixed failing unit test
This commit is contained in:
@@ -29,7 +29,6 @@ define([
|
||||
if (!templateParameter.current || !templateParameter.current.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
_templateData[templateParameter.name] = templateParameter.current.value;
|
||||
});
|
||||
this._templateData = _templateData;
|
||||
|
||||
@@ -20,7 +20,7 @@ define([
|
||||
}));
|
||||
|
||||
beforeEach(function() {
|
||||
_filterSrv.init( _dashboard.current );
|
||||
_filterSrv.init(_dashboard.current);
|
||||
});
|
||||
|
||||
describe('init', function() {
|
||||
@@ -34,10 +34,15 @@ define([
|
||||
});
|
||||
});
|
||||
|
||||
describe('templateOptionSelected', function() {
|
||||
describe('updateTemplateData', function() {
|
||||
beforeEach(function() {
|
||||
_filterSrv.addTemplateParameter({ name: 'test' });
|
||||
_filterSrv.templateOptionSelected(_filterSrv.templateParameters[0], { value: 'muuuu' });
|
||||
_filterSrv.addTemplateParameter({
|
||||
name: 'test',
|
||||
value: 'muuu',
|
||||
current: { value: 'muuuu' }
|
||||
});
|
||||
|
||||
_filterSrv.updateTemplateData();
|
||||
});
|
||||
it('should set current value and update template data', function() {
|
||||
var target = _filterSrv.applyTemplateToTarget('this.[[test]].filters');
|
||||
|
||||
Reference in New Issue
Block a user