summaryrefslogtreecommitdiffstats
path: root/js/tests/unit/service
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/service')
-rw-r--r--js/tests/unit/service/ItemResourceSpec.js15
-rw-r--r--js/tests/unit/service/OPMLImporterSpec.js31
2 files changed, 46 insertions, 0 deletions
diff --git a/js/tests/unit/service/ItemResourceSpec.js b/js/tests/unit/service/ItemResourceSpec.js
index 7b7df64fb..a3228f7a4 100644
--- a/js/tests/unit/service/ItemResourceSpec.js
+++ b/js/tests/unit/service/ItemResourceSpec.js
@@ -298,4 +298,19 @@ describe('ItemResource', function () {
}));
+
+ it ('should import articles', inject(function (ItemResource) {
+ var json = 'test';
+
+ http.expectPOST('base/feeds/import/articles', {
+ json: json
+ }).respond(200, {});
+
+ ItemResource.importArticles(json);
+
+ http.flush();
+
+ }));
+
+
}); \ No newline at end of file
diff --git a/js/tests/unit/service/OPMLImporterSpec.js b/js/tests/unit/service/OPMLImporterSpec.js
new file mode 100644
index 000000000..b8359f82f
--- /dev/null
+++ b/js/tests/unit/service/OPMLImporterSpec.js
@@ -0,0 +1,31 @@
+/**
+ * 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('OPMLParser', function () {
+ 'use strict';
+
+ var importer;
+
+ beforeEach(module('News', function ($provide) {
+ $provide.value('BASE_URL', 'base');
+ $provide.value('ITEM_BATCH_SIZE', 3);
+ }));
+
+ beforeEach(inject(function (OPMLImporter) {
+ importer = OPMLImporter;
+ }));
+
+
+ // FIXME: tests missing
+ it ('should parse the correct amount of feeds and folders', function () {
+
+ });
+
+
+});