diff options
| author | Vojta Jina | 2011-11-04 18:02:47 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-11-30 11:17:25 -0500 |
| commit | 92995bbce9877673f2642addd22fdf08d47bd39e (patch) | |
| tree | b9cfb5d3508a0dfb58d6e91c2a601029bcc69517 /test | |
| parent | b9707d910e8dd354a2f684588c1e7d83c5f88b8a (diff) | |
| download | angular.js-92995bbce9877673f2642addd22fdf08d47bd39e.tar.bz2 | |
fix($http): default json transformation should not crash on angular template
The way we determine whether it's json is lame anyway. We need to change that.
We should probably check the content type header...
Diffstat (limited to 'test')
| -rw-r--r-- | test/service/httpSpec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/service/httpSpec.js b/test/service/httpSpec.js index 83a6e860..210020f4 100644 --- a/test/service/httpSpec.js +++ b/test/service/httpSpec.js @@ -758,6 +758,16 @@ describe('$http', function() { expect(callback).toHaveBeenCalledOnce(); expect(callback.mostRecentCall.args[0]).toEqual([1, 'abc', {foo:'bar'}]); }); + + + it('should not deserialize tpl beginning with ng expression', function() { + $httpBackend.expect('GET', '/url').respond('{{some}}'); + $http.get('/url').on('200', callback); + $httpBackend.flush(); + + expect(callback).toHaveBeenCalledOnce(); + expect(callback.mostRecentCall.args[0]).toEqual('{{some}}'); + }); }); |
