Skip to content

Commit

Permalink
adding a test for #1770
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbmeyer committed Jul 27, 2015
1 parent 18444d0 commit 5a3a59e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions view/bindings/bindings_test.js
Expand Up @@ -1227,5 +1227,19 @@ steal("can/view/bindings", "can/map", "can/test", "can/component", "can/view/mus
});*/

test("conditionals within custom can-value (#1770)", function(){

var template = can.stache('<input can-value="{{#contact}}contact.{{/contact}}name">');
var map = new can.Map({contact: {name: "foo"}});

var frag = template(map);

var ta = document.getElementById("qunit-fixture");
ta.appendChild(frag);

var input = ta.getElementsByTagName("input")[0];
equal(input.value, "foo", "input value set correctly if key does not exist in map");

});

});

0 comments on commit 5a3a59e

Please sign in to comment.