diff options
Diffstat (limited to 'test/markupSpec.js')
| -rw-r--r-- | test/markupSpec.js | 14 |
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>'); + }); }); |
