summaryrefslogtreecommitdiffstats
path: root/tests/command/items.bats
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2022-05-31 15:46:01 +0200
committerGitHub <noreply@github.com>2022-05-31 15:46:01 +0200
commit1c91928e597cad6d41b10ce4b3f34b130453ad27 (patch)
tree5578acc0411c518fb442972edcc7699981277d90 /tests/command/items.bats
parentdbb641931699e6918896691992ca4ba61d705dc0 (diff)
If items of feed do not provide an author fallback to feed author (#1803)
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'tests/command/items.bats')
-rw-r--r--tests/command/items.bats14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/command/items.bats b/tests/command/items.bats
index 22a4c73c7..8a7111299 100644
--- a/tests/command/items.bats
+++ b/tests/command/items.bats
@@ -82,3 +82,17 @@ teardown() {
return $ret_status
fi
}
+
+@test "[$TESTSUITE] Test author fallback" {
+ ./occ news:feed:add "$user" $HEISE_FEED --title "Something-${BATS_SUITE_TEST_NUMBER}"
+ ID=$(./occ news:feed:list 'admin' | grep 'heise\.de' -1 | head -1 | grep -oE '[0-9]*')
+
+ run ./occ news:item:list-feed "$user" "$ID" --limit 200
+ [ "$status" -eq 0 ]
+
+ if ! echo "$output" | grep '"author": "heise online",'; then
+ ret_status=$?
+ echo "Author fallback did not work"
+ return $ret_status
+ fi
+} \ No newline at end of file