mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-26 13:05:35 +08:00
committed by
Misko Hevery
parent
0d52ff0f10
commit
b936e52874
@@ -14,7 +14,14 @@ describe("resource", function() {
|
||||
},
|
||||
patch: {
|
||||
method: 'PATCH'
|
||||
},
|
||||
conditionalPut: {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'If-None-Match': '*'
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
callback = jasmine.createSpy();
|
||||
}));
|
||||
@@ -146,6 +153,15 @@ describe("resource", function() {
|
||||
});
|
||||
|
||||
|
||||
it('should send correct headers', function() {
|
||||
$httpBackend.expectPUT('/CreditCard/123', undefined, function(headers) {
|
||||
return headers['If-None-Match'] == "*";
|
||||
}).respond({id:123});
|
||||
|
||||
CreditCard.conditionalPut({id: {key:123}});
|
||||
});
|
||||
|
||||
|
||||
it("should read partial resource", function() {
|
||||
$httpBackend.expect('GET', '/CreditCard').respond([{id:{key:123}}]);
|
||||
var ccs = CreditCard.query();
|
||||
|
||||
Reference in New Issue
Block a user