test/unit/angularjs/rails/resourceSpec.js in angularjs-rails-resource-0.2.4 vs test/unit/angularjs/rails/resourceSpec.js in angularjs-rails-resource-0.2.5

- old
+ new

@@ -414,9 +414,16 @@ // abc was originally set on the object so it should still be there after the update expect(test).toEqualData({id: 123, abc: 'xyz', xyz: 'abc', extra: 'test'}); })); }); + it('should be able to $post an array of resources', function () { + var data = [{id: 123, abc: 'xyz'}, {id: 124, abc: 'xyz'}]; + $httpBackend['expectPOST']('/xyz', {tests: data} ).respond(200, {tests: data}); + Test.$post('/xyz', data); + $httpBackend.flush(); + }); + }); describe('plural', function() { var $httpBackend, $rootScope, factory, PluralTest, pluralConfig = {