summaryrefslogtreecommitdiffstats
path: root/js/tests/unit/service
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-14 04:17:32 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-14 04:17:32 +0200
commit242fdbf9fcc39795fe5567eadcb55c6709b303c5 (patch)
tree6c85a9836080997bf223341e11eecdac3c51ac1e /js/tests/unit/service
parent721ae0b8bbde9716ed9073439805fd6497abf508 (diff)
add import articles
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 () {
+
+ });
+
+
+});