diff options
| author | Alkis Evlogimenos | 2010-09-17 19:44:23 +0200 |
|---|---|---|
| committer | Misko Hevery | 2010-09-20 11:57:50 +0200 |
| commit | 9627c4b50e1f8964fc59b0c2fd4914bd67514041 (patch) | |
| tree | 3c1853071556642d20f571a29b108a5f22047d26 /test/markupSpec.js | |
| parent | 293f34cd64886a1dddae9c295fafde5c47029a3b (diff) | |
| download | angular.js-9627c4b50e1f8964fc59b0c2fd4914bd67514041.tar.bz2 | |
Add ng:src and ng:href markup.
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>'); + }); }); |
