diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ResourceSpec.js | 7 | ||||
| -rw-r--r-- | test/scenario/StepsTest.js | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/test/ResourceSpec.js b/test/ResourceSpec.js index 799c7378..0c7af00a 100644 --- a/test/ResourceSpec.js +++ b/test/ResourceSpec.js @@ -61,7 +61,7 @@ describe("resource", function() { beforeEach(function(){ xhr = new MockXHR(); - resource = new ResourceFactory(xhr); + resource = new ResourceFactory(_(xhr.method).bind(xhr)); CreditCard = resource.route('/CreditCard/:id:verb', {id:'@id.key'}, { charge:{ method:'POST', @@ -80,6 +80,11 @@ describe("resource", function() { expect(typeof CreditCard.query).toBe('function'); }); + it('should default to empty parameters', function(){ + xhr.expectGET('URL').respond({}); + resource.route('URL').query(); + }); + it("should build resource with default param", function(){ xhr.expectGET('/Order/123/Line/456.visa?minimum=0.05').respond({id:'abc'}); var LineItem = resource.route('/Order/:orderId/Line/:id:verb', {orderId: '123', id: '@id.key', verb:'.visa', minimum:0.05}); diff --git a/test/scenario/StepsTest.js b/test/scenario/StepsTest.js index 9d64d0a9..32ef637d 100644 --- a/test/scenario/StepsTest.js +++ b/test/scenario/StepsTest.js @@ -2,6 +2,6 @@ StepsTest = TestCase("StepsTest"); StepsTest.prototype.testGivenDataset=function(){ var self = {frame:{}, dataset:[]}; - angular.test.GIVEN.dataset.call(self); + angular.scenario.GIVEN.dataset.call(self); assertEquals('$DATASET:{"dataset":[]}', self.frame.name); }; |
