aboutsummaryrefslogtreecommitdiffstats
path: root/test/ResourceSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ResourceSpec.js')
-rw-r--r--test/ResourceSpec.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ResourceSpec.js b/test/ResourceSpec.js
index 6e32ce18..546e9aec 100644
--- a/test/ResourceSpec.js
+++ b/test/ResourceSpec.js
@@ -114,6 +114,13 @@ describe("resource", function() {
CreditCard.charge({id:123, amount:10},{auth:'abc'}, callback);
});
+ it('should post charge verb on instance', function(){
+ xhr.expectPOST('/CreditCard/123!charge?amount=10', {id:{key:123}, name:'misko'}).respond({success:'ok'});
+
+ var card = new CreditCard({id:{key:123}, name:'misko'});
+ card.$charge({amount:10}, callback);
+ });
+
it('should create on save', function(){
xhr.expectPOST('/CreditCard', {name:'misko'}).respond({id:123});
var cc = new CreditCard();