summaryrefslogtreecommitdiffstats
path: root/js/tests/unit/controller/NavigationControllerSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/controller/NavigationControllerSpec.js')
-rw-r--r--js/tests/unit/controller/NavigationControllerSpec.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/tests/unit/controller/NavigationControllerSpec.js b/js/tests/unit/controller/NavigationControllerSpec.js
index 994414307..22c510c3f 100644
--- a/js/tests/unit/controller/NavigationControllerSpec.js
+++ b/js/tests/unit/controller/NavigationControllerSpec.js
@@ -1012,4 +1012,30 @@ describe('NavigationController', function () {
}));
+ it ('should set the feed ordering',
+ inject(function ($controller, FeedResource) {
+
+ FeedResource.add({
+ id: 2,
+ url: 'http://test.com',
+ folderId: 3,
+ ordering: 0
+ });
+
+ FeedResource.setOrdering = jasmine.createSpy('ordering');
+
+ var route = {
+ reload: jasmine.createSpy('reload')
+ };
+ var ctrl = $controller('NavigationController', {
+ $route: route
+ });
+
+ ctrl.setOrdering(FeedResource.getById(2), 2);
+
+ expect(FeedResource.setOrdering).toHaveBeenCalledWith(2, 2);
+ expect(route.reload).toHaveBeenCalled();
+ }));
+
+
});