Fixed state issue with variable value dropdown, #2080

This commit is contained in:
Torkel Ödegaard
2015-06-09 10:22:43 +02:00
parent f6845cd107
commit 604f8a22f7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ function (angular, app, _) {
var tag = { text: value, selected: false };
_.each(vm.variable.current.tags, function(tagObj) {
if (tagObj.text === value) {
tag.selected = true;
tag = tagObj;
}
});
return tag;
@@ -138,7 +138,7 @@ function () {
describe("Given variable with selected tags", function() {
beforeEach(function() {
ctrl.variable = {
current: {text: 'server-1', value: 'server-1', tags: [{text: 'key1'}] },
current: {text: 'server-1', value: 'server-1', tags: [{text: 'key1', selected: true}] },
options: [
{text: 'server-1', value: 'server-1'},
{text: 'server-2', value: 'server-2'},