summaryrefslogtreecommitdiffstats
path: root/js/tests/unit/service/FeedResourceSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/service/FeedResourceSpec.js')
-rw-r--r--js/tests/unit/service/FeedResourceSpec.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/js/tests/unit/service/FeedResourceSpec.js b/js/tests/unit/service/FeedResourceSpec.js
index 5f0d3c25a..75aa35deb 100644
--- a/js/tests/unit/service/FeedResourceSpec.js
+++ b/js/tests/unit/service/FeedResourceSpec.js
@@ -29,7 +29,8 @@ describe('FeedResource', function () {
FeedResource.receive([
{id: 1, folderId: 3, url: 'ye', unreadCount: 45},
{id: 2, folderId: 4, location: 'test', url: 'sye', unreadCount: 25},
- {id: 3, folderId: 3, title: 'hore', url: '1sye', unreadCount: 0}
+ {id: 3, folderId: 3, title: 'hore', url: '1sye', unreadCount: 0,
+ ordering: 0}
]);
}));
@@ -287,4 +288,17 @@ describe('FeedResource', function () {
expect(FeedResource.getUnreadCount()).toBe(70);
}));
+
+ it ('should set the feed ordering', inject(function (FeedResource) {
+ http.expectPOST('base/feeds/3/ordering', {
+ ordering: 2
+ }).respond(200, {});
+
+ FeedResource.setOrdering(3, 2);
+
+ http.flush();
+
+ expect(FeedResource.getById(3).ordering).toBe(2);
+ }));
+
});