1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-10-17 08:42:48 +02:00
Nextcloud-News/tests/integration/opml.bats
Sean Molenaar bcdeb55fcb Actions: Integration tests using bats
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-01 21:13:44 +01:00

26 lines
591 B
Bash

#!/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
}