diff options
Diffstat (limited to 'tests/command/items.bats')
-rw-r--r-- | tests/command/items.bats | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/command/items.bats b/tests/command/items.bats index 8a7111299..ef9494056 100644 --- a/tests/command/items.bats +++ b/tests/command/items.bats @@ -11,10 +11,11 @@ setup() { ID=$(./occ news:feed:list 'admin' | grep 'github\.com' -1 | head -1 | grep -oE '[0-9]*') } -teardown() { - if [ -n "$ID" ]; then +teardown(){ + ID_LIST=($(./occ news:feed:list 'admin' | grep -Po '"id": \K([0-9]+)' | tr '\n' ' ')) + for ID in $ID_LIST; do ./occ news:feed:delete "$user" "$ID" - fi + done } @test "[$TESTSUITE] List 200 items in feed" { @@ -95,4 +96,4 @@ teardown() { echo "Author fallback did not work" return $ret_status fi -}
\ No newline at end of file +} |