From 6925e40589e4357e0dec08ab23db40fdd53538fa Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Sun, 2 May 2021 15:16:19 +0200 Subject: adjust tests Signed-off-by: Benjamin Brahmer --- tests/integration/feeds.bats | 17 ++++++++++++++++- tests/integration/helpers/settings.bash | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/integration/feeds.bats b/tests/integration/feeds.bats index 2701cbfa9..1e60b5552 100644 --- a/tests/integration/feeds.bats +++ b/tests/integration/feeds.bats @@ -34,9 +34,24 @@ teardown() { return $ret_status fi +} + +@test "[$TESTSUITE] Favicon" { + ./occ news:feed:add "$user" "$NC_FEED" --title "Something-${BATS_SUITE_TEST_NUMBER}" + ./occ news:feed:add "$user" "$HEISE_FEED" --title "Something-${BATS_SUITE_TEST_NUMBER}" + + run ./occ news:feed:list "$user" + [ "$status" -eq 0 ] + if ! echo "$output" | grep -F '"faviconLink": "https:\/\/nextcloud.com\/media\/screenshot-150x150.png"'; then ret_status=$? - echo "Favicon not found in list" + echo "Logo test failed" + return $ret_status + fi + + if ! echo "$output" | grep -F '"faviconLink": "https:\/\/www.heise.de\/favicon.ico"'; then + ret_status=$? + echo "Favicon test failed" return $ret_status fi } diff --git a/tests/integration/helpers/settings.bash b/tests/integration/helpers/settings.bash index 48b5a3726..4e758b609 100644 --- a/tests/integration/helpers/settings.bash +++ b/tests/integration/helpers/settings.bash @@ -1,2 +1,3 @@ user=admin -NC_FEED="https://nextcloud.com/blog/static-feed/" \ No newline at end of file +NC_FEED="https://nextcloud.com/blog/static-feed/" +HEISE_FEED="https://www.heise.de/rss/heise-atom.xml" \ No newline at end of file -- cgit v1.2.3