aboutsummaryrefslogtreecommitdiffstats
path: root/test/ResourceSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ResourceSpec.js')
-rw-r--r--test/ResourceSpec.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ResourceSpec.js b/test/ResourceSpec.js
index a143fc0e..80776e83 100644
--- a/test/ResourceSpec.js
+++ b/test/ResourceSpec.js
@@ -75,6 +75,15 @@ describe("resource", function() {
nakedExpect(item).toEqual({id:'abc'});
});
+ it("should build resource with action default param overriding default param", function(){
+ xhr.expectGET('/Customer/123').respond({id:'abc'});
+ var TypeItem = resource.route('/:type/:typeId', {type: 'Order'},
+ {get: {method: 'GET', params: {type: 'Customer'}}});
+ var item = TypeItem.get({typeId:123});
+ xhr.flush();
+ nakedExpect(item).toEqual({id:'abc'});
+ });
+
it("should create resource", function(){
xhr.expectPOST('/CreditCard', {name:'misko'}).respond({id:123, name:'misko'});