diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2022-03-18 10:17:52 +0100 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-05-03 21:27:48 +0200 |
commit | 0e3481a454d3fb0d28403e86434e3aa02cd45fb5 (patch) | |
tree | 158d8921dc6e78ed118e148e0d16bed2e0507fa6 | |
parent | 6d10b6e8f1a913953612d4cb24cd0a7f177c1059 (diff) |
improvements
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r-- | tests/api/feeds.bats | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/api/feeds.bats b/tests/api/feeds.bats index 945ac0a53..257d5a1e1 100644 --- a/tests/api/feeds.bats +++ b/tests/api/feeds.bats @@ -53,7 +53,7 @@ teardown() { run http --ignore-stdin -b -a ${user}:${user} DELETE ${BASE_URLv1}/feeds/$ID - assert_output --partial "[]" + assert_output "[]" } @test "[$TESTSUITE] Move feed to different folder" { @@ -79,8 +79,9 @@ teardown() { FEEDID=$(http --ignore-stdin -b -a ${user}:${user} POST ${BASE_URLv1}/feeds url=$NC_FEED folderId=$FOLDER_ID | grep -Po '"id":\K([0-9]+)') - # move feed, returns nothing + # move feed to "null", returns nothing http --ignore-stdin -b -a ${user}:${user} PUT ${BASE_URLv1}/feeds/$FEEDID/move folderId=null + # run is not working here. output=$(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/feeds | jq '.feeds | .[0].folderId') @@ -94,6 +95,7 @@ teardown() { # rename feed, returns nothing http --ignore-stdin -b -a ${user}:${user} PUT ${BASE_URLv1}/feeds/$FEEDID/rename feedTitle="Great Title" + # run is not working here. output=$(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/feeds | jq '.feeds | .[0].title') @@ -114,7 +116,7 @@ teardown() { done # mark all items of feed as read, returns nothing - http --ignore-stdin -b -a ${user}:${user} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" + STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${user} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" 2>&1| grep HTTP/) # collect unread status unread=$(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/items id=$FEEDID | grep -Po '"unread":\K((true)|(false))' | tr '\n' ' ') @@ -123,6 +125,7 @@ teardown() { if $n then echo "Item was not marked as read" + echo $STATUS_CODE false fi done |