diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/FiltersSpec.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/FiltersSpec.js b/test/FiltersSpec.js index 4dd108ac..0de7b5b7 100644 --- a/test/FiltersSpec.js +++ b/test/FiltersSpec.js @@ -74,8 +74,8 @@ describe('filter', function(){ }); describe('Linky', function() { + var linky = filter.linky; it('should do basic filter', function(){ - var linky = filter.linky; assertEquals( '<a href="http://ab/">http://ab/</a> ' + '(<a href="http://a/">http://a/</a>) ' + @@ -84,6 +84,13 @@ describe('filter', function(){ linky("http://ab/ (http://a/) <http://a/> http://1.2/v:~-123. c").html); assertEquals(undefined, linky(undefined)); }); + + it('should handle mailto:', function(){ + expect(linky("mailto:me@example.com").html).toEqual('<a href="mailto:me@example.com">me@example.com</a>'); + expect(linky("me@example.com").html).toEqual('<a href="mailto:me@example.com">me@example.com</a>'); + expect(linky("send email to me@example.com, but").html). + toEqual('send email to <a href="mailto:me@example.com">me@example.com</a>, but'); + }); }); describe('date', function(){ |
