aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZach Dexter2012-10-09 14:04:58 -0400
committerIgor Minar2012-11-24 22:21:50 +0100
commit610927d77b77700c5c61accd503a2af0fa51cfe6 (patch)
tree767b59a129c42151d8c92b536ba106dd273a7a84 /test
parent55d15806fb14b1d98b5ca2770bbbb59e11548c62 (diff)
downloadangular.js-610927d77b77700c5c61accd503a2af0fa51cfe6.tar.bz2
feat(linky): allow optional 'target' argument
Closes #1443
Diffstat (limited to 'test')
-rw-r--r--test/ngSanitize/filter/linkySpec.js7
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>')
+ });
});