diff options
| author | Zach Dexter | 2012-10-09 14:04:58 -0400 |
|---|---|---|
| committer | Igor Minar | 2012-11-24 22:21:50 +0100 |
| commit | 610927d77b77700c5c61accd503a2af0fa51cfe6 (patch) | |
| tree | 767b59a129c42151d8c92b536ba106dd273a7a84 /test | |
| parent | 55d15806fb14b1d98b5ca2770bbbb59e11548c62 (diff) | |
| download | angular.js-610927d77b77700c5c61accd503a2af0fa51cfe6.tar.bz2 | |
feat(linky): allow optional 'target' argument
Closes #1443
Diffstat (limited to 'test')
| -rw-r--r-- | test/ngSanitize/filter/linkySpec.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ngSanitize/filter/linkySpec.js b/test/ngSanitize/filter/linkySpec.js index 0448159a..a3ef2070 100644 --- a/test/ngSanitize/filter/linkySpec.js +++ b/test/ngSanitize/filter/linkySpec.js @@ -24,4 +24,11 @@ describe('linky', function() { expect(linky("send email to me@example.com, but")). toEqual('send email to <a href="mailto:me@example.com">me@example.com</a>, but'); }); + + it('should handle target:', function() { + expect(linky("http://example.com", "_blank")). + toEqual('<a target="_blank" href="http://example.com">http://example.com</a>') + expect(linky("http://example.com", "someNamedIFrame")). + toEqual('<a target="someNamedIFrame" href="http://example.com">http://example.com</a>') + }); }); |
