summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2021-05-02 15:16:19 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2021-05-02 15:16:19 +0200
commit6925e40589e4357e0dec08ab23db40fdd53538fa (patch)
tree8ff2fb47dc9cfa32488f0e2e833f8ecf65417630
parent7751412bd2d557b4e8e52d123a369ff97cbc552b (diff)
downloadnextcloud-news-fix/favicon_fetching.tar.gz
nextcloud-news-fix/favicon_fetching.tar.xz
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r--tests/integration/feeds.bats17
-rw-r--r--tests/integration/helpers/settings.bash3
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