diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-11-01 15:16:15 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-11-01 15:16:15 +0100 |
commit | a42da9a97c7fc84af09e01f3d6f3ee80a46b763b (patch) | |
tree | cf4b58d55c0f4e46db3dbea1bd3bd93f155d107c /js/tests | |
parent | cc5dd4231b11f87a7b0d0e66a7d00e62d11f7fb9 (diff) |
clean up feed api
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/unit/controller/NavigationControllerSpec.js | 4 | ||||
-rw-r--r-- | js/tests/unit/service/FeedResourceSpec.js | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/js/tests/unit/controller/NavigationControllerSpec.js b/js/tests/unit/controller/NavigationControllerSpec.js index a5300453f..904455c5c 100644 --- a/js/tests/unit/controller/NavigationControllerSpec.js +++ b/js/tests/unit/controller/NavigationControllerSpec.js @@ -612,7 +612,7 @@ describe('NavigationController', function () { it('should rename a feed', inject(function ($controller, FeedResource) { - FeedResource.rename = jasmine.createSpy('rename'); + FeedResource.patch = jasmine.createSpy('patch'); var ctrl = $controller('NavigationController', { FeedResource: FeedResource, @@ -626,7 +626,7 @@ describe('NavigationController', function () { ctrl.renameFeed(feed); - expect(FeedResource.rename).toHaveBeenCalledWith(3, 'test'); + expect(FeedResource.patch).toHaveBeenCalledWith(3, {title: 'test'}); expect(feed.editing).toBe(false); })); diff --git a/js/tests/unit/service/FeedResourceSpec.js b/js/tests/unit/service/FeedResourceSpec.js index 1911a9a3a..95767e633 100644 --- a/js/tests/unit/service/FeedResourceSpec.js +++ b/js/tests/unit/service/FeedResourceSpec.js @@ -128,19 +128,19 @@ describe('FeedResource', function () { it ('should rename a feed', inject(function (FeedResource) { - http.expectPOST('base/feeds/3/rename', { - feedTitle: 'heho' + http.expectPATCH('base/feeds/3', { + title: 'heho' }).respond(200, {}); - FeedResource.rename(3, 'heho'); + FeedResource.patch(3, {title: 'heho'}); http.flush(); })); it ('should move a feed', inject(function (FeedResource) { - http.expectPOST('base/feeds/2/move', { - parentFolderId: 5 + http.expectPATCH('base/feeds/2', { + folderId: 5 }).respond(200, {}); FeedResource.move(2, 5); |