Browse files

modify unit test to correctly verify that expanded URL is used as a t…

…itle but its tail is not included in the body text
  • Loading branch information...
1 parent c6db895 commit b4bbc0ddf4f2a3ff3b051bc99909ee5ff568e2cc @keitaf keitaf committed May 2, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/tests.js
@@ -177,7 +177,8 @@ test("twttr.txt.autolink", function() {
ok(picTwitter.match(/<a href="http:\/\/\/0JG5Mcq"[^>]+>/), 'Use URL as link target');
ok(picTwitter.match(/>\/xyz</), 'Use display url from url entities');
- ok(!picTwitter.match(/foo\/statuses/), 'Don\'t include the tail of expanded_url');
+ ok(picTwitter.match(/title="http:\/\/\/foo\/statuses\/123\/photo\/1"/), 'Use expanded url as title');
+ ok(!picTwitter.match(/foo\/statuses</), 'Don\'t include the tail of expanded_url');
// urls with invalid character
var invalidChars = ['\u202A', '\u202B', '\u202C', '\u202D', '\u202E'];

0 comments on commit b4bbc0d

Please sign in to comment.