summaryrefslogtreecommitdiffstats
path: root/tests/integration/opml.bats
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2021-02-23 17:19:10 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-03-01 21:13:44 +0100
commitbcdeb55fcbbbd02955e5cafd47d8d8db2670f22c (patch)
treea525dcbe2109b5cd180c765707001a462656371c /tests/integration/opml.bats
parent59885c27f7a6cddc2a6d06d1a91885780190f1ee (diff)
Actions: Integration tests using bats
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests/integration/opml.bats')
-rw-r--r--tests/integration/opml.bats26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/integration/opml.bats b/tests/integration/opml.bats
new file mode 100644
index 000000000..b2d576e8e
--- /dev/null
+++ b/tests/integration/opml.bats
@@ -0,0 +1,26 @@
+#!/usr/bin/env bats
+
+load "helpers/settings"
+
+TESTSUITE="OPML"
+
+teardown() {
+ ID=$(./occ news:feed:list 'admin' | grep "Something-${BATS_SUITE_TEST_NUMBER}" -1 | head -1 | grep -oE '[0-9]*')
+ if [ -n "$ID" ]; then
+ ./occ news:feed:delete "$user" "$ID"
+ fi
+}
+
+@test "[$TESTSUITE] Export" {
+ run ./occ news:feed:add "$user" "https://nextcloud.com/blog/static-feed/"
+ [ "$status" -eq 0 ]
+
+ run ./occ news:opml:export "$user"
+ [ "$status" -eq 0 ]
+
+ if ! echo "$output" | grep "https://nextcloud.com/"; then
+ ret_status=$?
+ echo "Feed not exported"
+ return $ret_status
+ fi
+} \ No newline at end of file