aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/compilerSpec.js
diff options
context:
space:
mode:
authorVojta Jina2012-03-23 13:04:52 -0700
committerVojta Jina2012-03-26 21:14:09 -0700
commit09e175f02cca0f4a295fd0c9b980cd8f432e722b (patch)
tree49796ba88d2db7a6e621155e9849109206f744cd /test/service/compilerSpec.js
parent5c5b1183c82a28841b3e1e246ee341262e91d743 (diff)
downloadangular.js-09e175f02cca0f4a295fd0c9b980cd8f432e722b.tar.bz2
feat(ngValue): allow radio inputs to have non string values
Closes #816
Diffstat (limited to 'test/service/compilerSpec.js')
-rw-r--r--test/service/compilerSpec.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/service/compilerSpec.js b/test/service/compilerSpec.js
index d7ecdafc..698fc23e 100644
--- a/test/service/compilerSpec.js
+++ b/test/service/compilerSpec.js
@@ -1401,7 +1401,7 @@ describe('$compile', function() {
it('should allow overriding of attribute name and remember the name', function() {
- attr.$set('ngOther', '123', 'other');
+ attr.$set('ngOther', '123', true, 'other');
expect(element.attr('other')).toEqual('123');
expect(attr.ngOther).toEqual('123');
@@ -1437,7 +1437,15 @@ describe('$compile', function() {
attr.$set('ngMyAttr', 'value');
attr.$set('ngMyAttr', null);
expect(element.attr('ng-my-attr')).toBe(undefined);
- })
+ });
+
+
+ it('should not set DOM element attr if writeAttr false', function() {
+ attr.$set('test', 'value', false);
+
+ expect(element.attr('test')).toBeUndefined();
+ expect(attr.test).toBe('value');
+ });
});
});