diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-04-05 15:13:30 +0200 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-05 19:18:19 +0200 |
commit | 951f3eb7eefae9b7236517a2eca8fcbfe77567b2 (patch) | |
tree | fafe57eb7d65515e0d3478bb3066c14524b58feb /tests/integration | |
parent | 5264713b50be83d022b15cd0431134972af25c36 (diff) |
DB: Allow negative limits
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/items.bats | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/tests/integration/items.bats b/tests/integration/items.bats index e85c8956c..22a4c73c7 100644 --- a/tests/integration/items.bats +++ b/tests/integration/items.bats @@ -17,7 +17,7 @@ teardown() { fi } -@test "[$TESTSUITE] List all items in feed" { +@test "[$TESTSUITE] List 200 items in feed" { run ./occ news:item:list-feed "$user" "$ID" --limit 200 [ "$status" -eq 0 ] @@ -28,7 +28,18 @@ teardown() { fi } -@test "[$TESTSUITE] List all items in folder" { +@test "[$TESTSUITE] List all items in feed" { + run ./occ news:item:list-feed "$user" "$ID" --limit 0 + [ "$status" -eq 0 ] + + if ! echo "$output" | grep "$TAG"; then + ret_status=$? + echo "Release not found in feed list" + return $ret_status + fi +} + +@test "[$TESTSUITE] List 200 items in folder" { run ./occ news:item:list-folder "$user" --limit 200 [ "$status" -eq 0 ] @@ -39,7 +50,18 @@ teardown() { fi } -@test "[$TESTSUITE] List all items" { +@test "[$TESTSUITE] List all items in folder" { + run ./occ news:item:list-folder "$user" --limit 0 + [ "$status" -eq 0 ] + + if ! echo "$output" | grep "$TAG"; then + ret_status=$? + echo "Release not found in folder list" + return $ret_status + fi +} + +@test "[$TESTSUITE] List 200 items" { run ./occ news:item:list "$user" --limit 200 [ "$status" -eq 0 ] @@ -48,4 +70,15 @@ teardown() { echo "Release not found in list" return $ret_status fi -}
\ No newline at end of file +} + +@test "[$TESTSUITE] List all items" { + run ./occ news:item:list "$user" --limit 0 + [ "$status" -eq 0 ] + + if ! echo "$output" | grep "$TAG"; then + ret_status=$? + echo "Release not found in list" + return $ret_status + fi +} |