diff options
| author | Misko Hevery | 2010-11-02 18:39:30 -0700 | 
|---|---|---|
| committer | Igor Minar | 2010-11-03 09:47:22 -0700 | 
| commit | 5159eb76350a4da587bab3d73e212ed134cde789 (patch) | |
| tree | 8027cdee61d97e3be28b81714bf0397fd65d8863 /test/FiltersSpec.js | |
| parent | 1ba8c2a33a2855b5c56aaaa79f402aa5196cc018 (diff) | |
| download | angular.js-5159eb76350a4da587bab3d73e212ed134cde789.tar.bz2 | |
fix the linky filter
Diffstat (limited to 'test/FiltersSpec.js')
| -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(){ | 
