diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-03-01 21:10:46 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-03-31 22:39:00 +0200 |
commit | 78dce7ffe18665bf083ff69631db8ae128a2b99f (patch) | |
tree | 1f4e61970b7461afd968552f4bccef53daedbb93 /tests/integration/feeds.bats | |
parent | 17f773b723538eedf5bd2efcb8d2c85783d7050f (diff) |
DB: Updates should use set()
Issue GH-1211
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests/integration/feeds.bats')
-rw-r--r-- | tests/integration/feeds.bats | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/integration/feeds.bats b/tests/integration/feeds.bats index d8f0aad8c..2701cbfa9 100644 --- a/tests/integration/feeds.bats +++ b/tests/integration/feeds.bats @@ -57,6 +57,25 @@ teardown() { fi } +@test "[$TESTSUITE] Read all" { + ./occ news:feed:add "$user" "$NC_FEED" --title "Something-${BATS_SUITE_TEST_NUMBER}" + + run ./occ news:feed:list "$user" + [ "$status" -eq 0 ] + + echo "$output" | grep "Something-${BATS_SUITE_TEST_NUMBER}" + + ID=$(./occ news:feed:list 'admin' | grep "Something-${BATS_SUITE_TEST_NUMBER}" -2 | head -1 | grep -oE '[0-9]*') + run ./occ news:feed:read "$user" "$ID" -v + [ "$status" -eq 0 ] + + if ! echo "$output" | grep "items as read"; then + ret_status=$? + echo "Feed not read" + return $ret_status + fi +} + @test "[$TESTSUITE] Delete all" { ./occ news:feed:add "$user" "$NC_FEED" --title "Something-${BATS_SUITE_TEST_NUMBER}" @@ -68,4 +87,4 @@ teardown() { ID=$(./occ news:feed:list 'admin' | grep "Something-${BATS_SUITE_TEST_NUMBER}" -2 | head -1 | grep -oE '[0-9]*') run ./occ news:feed:delete "$user" "$ID" [ "$status" -eq 0 ] -}
\ No newline at end of file +} |