diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 4370e3a6a916..2af276360d82 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -419,4 +419,4 @@ angular.module('ngResource', ['ng']). } return ResourceFactory; - }]); \ No newline at end of file + }]); diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js index 8f7239155178..e148be9947e2 100644 --- a/test/ngResource/resourceSpec.js +++ b/test/ngResource/resourceSpec.js @@ -63,6 +63,7 @@ describe("resource", function() { R.get({a:4, b:5, c:6}); }); + it('should support escaping colons in url template', function() { var R = $resource('http://localhost\\:8080/Path/:a/\\:stillPath/:b'); @@ -151,6 +152,7 @@ describe("resource", function() { expect(callback.mostRecentCall.args[1]()).toEqual({}); }); + it('should send correct headers', function() { $httpBackend.expectPUT('/CreditCard/123', undefined, function(headers) { return headers['If-None-Match'] == "*"; @@ -158,7 +160,8 @@ describe("resource", function() { CreditCard.conditionalPut({id: {key:123}}); }); - + + it("should read partial resource", function() { $httpBackend.expect('GET', '/CreditCard').respond([{id:{key:123}}]); var ccs = CreditCard.query(); @@ -353,4 +356,4 @@ describe("resource", function() { expect(callback).not.toHaveBeenCalled(); }); }); -}); \ No newline at end of file +});