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.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/js/tests/unit/controller/NavigationControllerSpec.js b/js/tests/unit/controller/NavigationControllerSpec.js
new file mode 100644
index 000000000..a8d3a0f76
--- /dev/null
+++ b/js/tests/unit/controller/NavigationControllerSpec.js
@@ -0,0 +1,36 @@
+/**
+ * ownCloud - News
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Bernhard Posselt <dev@bernhard-posselt.com>
+ * @copyright Bernhard Posselt 2014
+ */
+describe('NavigationController', () => {
+ 'use strict';
+
+ let controller;
+
+ beforeEach(module('News', ($provide) => {
+ $provide.value('BASE_URL', 'base');
+ }));
+
+ beforeEach(inject(($controller) => {
+ controller = $controller('NavigationController');
+ }));
+
+
+ it('should expose Feeds', inject((FeedResource) => {
+ FeedResource.add({url: 1});
+ expect(controller.getFeeds()).toBe(FeedResource.getAll());
+ }));
+
+
+ it('should expose Folders', inject((FolderResource) => {
+ FolderResource.add({name: 1});
+ expect(controller.getFolders()).toBe(FolderResource.getAll());
+ }));
+
+
+}); \ No newline at end of file