aboutsummaryrefslogtreecommitdiffstats
path: root/test/ngResource/resourceSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ngResource/resourceSpec.js')
-rw-r--r--test/ngResource/resourceSpec.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js
index 550b4432..d13156b3 100644
--- a/test/ngResource/resourceSpec.js
+++ b/test/ngResource/resourceSpec.js
@@ -242,6 +242,13 @@ describe("resource", function() {
});
+ it('should throw an exception if a param is called "hasOwnProperty"', function() {
+ expect(function() {
+ $resource('/:hasOwnProperty').get();
+ }).toThrowMinErr('$resource','badname', "hasOwnProperty is not a valid parameter name");
+ });
+
+
it("should create resource", function() {
$httpBackend.expect('POST', '/CreditCard', '{"name":"misko"}').respond({id: 123, name: 'misko'});