diff --git a/test/autolink-spec.coffee b/test/autolink-spec.coffee index ac2c45c..d9b78f3 100644 --- a/test/autolink-spec.coffee +++ b/test/autolink-spec.coffee @@ -61,7 +61,7 @@ describe "autolink", -> toEqual( "Click here ftp://ftp.google.com" ) - + it "sets link attributes based on the options provided", -> expect("Google it: http://google.com".autoLink(target: "_blank")). toEqual( @@ -77,6 +77,17 @@ describe "autolink", -> "rel='nofollow'>http://google.com" ) + xit "correctly handles surrounding HTML tags", -> + expect("
http://nba.com
".autoLink()). + toEqual("") + + it "can begin with a hyperlink", -> + expect("http://google.com That is a link to Google".autoLink()). + toEqual( + "http://google.com " + + "That is a link to Google" + ) + describe "callback option", -> it "can be passed to redefine how link will be rendered", -> expect("Google it: http://google.com" diff --git a/test/autolink-spec.js b/test/autolink-spec.js index 8d3095c..70620a0 100644 --- a/test/autolink-spec.js +++ b/test/autolink-spec.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.4.0 +// Generated by CoffeeScript 1.6.1 (function() { describe("autolink", function() { @@ -46,6 +46,12 @@ rel: "nofollow" })).toEqual("Google it: http://google.com"); }); + xit("correctly handles surrounding HTML tags", function() { + return expect("http://nba.com
".autoLink()).toEqual(""); + }); + it("can begin with a hyperlink", function() { + return expect("http://google.com That is a link to Google".autoLink()).toEqual("http://google.com " + "That is a link to Google"); + }); describe("callback option", function() { it("can be passed to redefine how link will be rendered", function() { return expect("Google it: http://google.com".autoLink({