aboutsummaryrefslogtreecommitdiffstats
path: root/test/markupSpec.js
diff options
context:
space:
mode:
authorDi Peng2011-08-25 16:31:00 -0700
committerDi Peng2011-08-25 16:34:18 -0700
commit5927b23ef35736ec075e226c32d46decb5d42e34 (patch)
tree4c3f6b934b12e16854983f7ba51402cdf9618b01 /test/markupSpec.js
parent452607fc64b2b0ba5ee9a8745746e652ae21b6db (diff)
downloadangular.js-5927b23ef35736ec075e226c32d46decb5d42e34.tar.bz2
fix(markup): Make special attrs such as ng:href work even without binding
- special attrs such as ng:href, ng:check did not work as intended when their values do not contain bindings. And this commit is to fix that Closes #534
Diffstat (limited to 'test/markupSpec.js')
-rw-r--r--test/markupSpec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/markupSpec.js b/test/markupSpec.js
index 36861e17..ea786395 100644
--- a/test/markupSpec.js
+++ b/test/markupSpec.js
@@ -154,6 +154,14 @@ describe("markups", function(){
expect(sortedHtml(element)).toEqual('<a ng:bind-attr="{"href":"{{url}}","rel":"{{rel}}"}"></a>');
});
+ it('should bind Text with no Bindings', function() {
+ forEach('src,href,checked,disabled,multiple,readonly,selected'.split(','), function(name) {
+ compile('<div ng:' + name +'="some"></div>');
+ expect(sortedHtml(element)).toEqual('<div ng:bind-attr="{"' + name +'":"some"}"></div>');
+ dealoc(element);
+ });
+ })
+
it('should Parse Text With No Bindings', function(){
var parts = parseBindings("a");
assertEquals(parts.length, 1);