aboutsummaryrefslogtreecommitdiffstats
path: root/test/widget/inputSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/widget/inputSpec.js')
-rw-r--r--test/widget/inputSpec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/widget/inputSpec.js b/test/widget/inputSpec.js
index c73d5fdd..179f8156 100644
--- a/test/widget/inputSpec.js
+++ b/test/widget/inputSpec.js
@@ -402,6 +402,24 @@ describe('widget: input', function() {
expect(inputs[0].checked).toBe(true);
expect(inputs[1].checked).toBe(false);
});
+
+
+ it('it should work with value attribute that is data-bound', function(){
+ compile(
+ '<li>'+
+ '<input ng:repeat="item in [\'a\', \'b\']" ' +
+ ' type="radio" ng:model="choice" value="{{item}}" name="choice">'+
+ '</li>');
+
+ var inputs = scope.$element.find('input');
+ expect(inputs[0].checked).toBe(false);
+ expect(inputs[1].checked).toBe(false);
+
+ scope.choice = 'b';
+ scope.$digest();
+ expect(inputs[0].checked).toBe(false);
+ expect(inputs[1].checked).toBe(true);
+ });
});