summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2022-03-17 19:44:14 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2022-05-03 21:27:48 +0200
commit6d10b6e8f1a913953612d4cb24cd0a7f177c1059 (patch)
tree760887083ea57fb2dac2fd1b42587112b6818d4d
parentb808e2fe49914aba76d26316769c145c03456ffe (diff)
fixes, mark all items as read via feed api
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r--tests/api/feeds.bats14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/api/feeds.bats b/tests/api/feeds.bats
index 78b0f2457..945ac0a53 100644
--- a/tests/api/feeds.bats
+++ b/tests/api/feeds.bats
@@ -10,14 +10,14 @@ TESTSUITE="Feeds"
teardown() {
# delete all feeds
- ID=$(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/feeds | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')
- for i in $ID; do
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/feeds | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+ for i in $ID_LIST; do
http --ignore-stdin -b -a ${user}:${user} DELETE ${BASE_URLv1}/feeds/$i
done
# delete all folders
- ID=$(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/folders | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')
- for i in $ID; do
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/folders | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+ for i in $ID_LIST; do
http --ignore-stdin -b -a ${user}:${user} DELETE ${BASE_URLv1}/folders/$i
done
}
@@ -105,11 +105,11 @@ teardown() {
# create feed and store id
FEEDID=$(http --ignore-stdin -b -a ${user}:${user} POST ${BASE_URLv1}/feeds url=$NC_FEED | grep -Po '"id":\K([0-9]+)')
- ID=$(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/items id=$FEEDID | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/items id=$FEEDID | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
# get biggest item ID
- max=${ID[0]}
- for n in "${ID[@]}" ; do
+ max=${ID_LIST[0]}
+ for n in "${ID_LIST[@]}" ; do
((n > max)) && max=$n
done