Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4aac29d

Browse files
committed
added additional test
1 parent 49e08f5 commit 4aac29d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/services.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ function switchRouteMatcher(on, when, dstName) {
213213
return match ? dst : null;
214214
}
215215

216-
angularService('$route', function(location, params){
216+
angularService('$route', function(location){
217217
var routes = {},
218218
onChange = [],
219219
matcher = switchRouteMatcher,

test/ResourceSpec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ describe("resource", function() {
114114
CreditCard.charge({id:123, amount:10},{auth:'abc'}, callback);
115115
});
116116

117+
it('should post charge verb on instance', function(){
118+
xhr.expectPOST('/CreditCard/123!charge?amount=10', {id:{key:123}, name:'misko'}).respond({success:'ok'});
119+
120+
var card = new CreditCard({id:{key:123}, name:'misko'});
121+
card.$charge({amount:10}, callback);
122+
});
123+
117124
it('should create on save', function(){
118125
xhr.expectPOST('/CreditCard', {name:'misko'}).respond({id:123});
119126
var cc = new CreditCard();

0 commit comments

Comments
 (0)