aboutsummaryrefslogtreecommitdiffstats
path: root/test/markupSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/markupSpec.js')
-rw-r--r--test/markupSpec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/markupSpec.js b/test/markupSpec.js
index 5fe5bba9..1dd6f939 100644
--- a/test/markupSpec.js
+++ b/test/markupSpec.js
@@ -47,6 +47,20 @@ describe("markups", function(){
expect(sortedHtml(element).replace(' selected="true"', '')).toEqual('<select name="x"><option value="a">a</option></select>');
});
+ it('should bind href', function() {
+ compile('<a ng:href="{{url}}"></a>');
+ expect(sortedHtml(element)).toEqual('<a ng:bind-attr="{"href":"{{url}}"}"></a>');
+ });
+
+ it('should bind src', function() {
+ compile('<img ng:src="{{url}}" />');
+ expect(sortedHtml(element)).toEqual('<img ng:bind-attr="{"src":"{{url}}"}"></img>');
+ });
+
+ it('should bind href and merge with other attrs', function() {
+ compile('<a ng:href="{{url}}" rel="{{rel}}"></a>');
+ expect(sortedHtml(element)).toEqual('<a ng:bind-attr="{"href":"{{url}}","rel":"{{rel}}"}"></a>');
+ });
});