From 951f3eb7eefae9b7236517a2eca8fcbfe77567b2 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Mon, 5 Apr 2021 15:13:30 +0200 Subject: DB: Allow negative limits Signed-off-by: Sean Molenaar --- tests/integration/items.bats | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) (limited to 'tests/integration/items.bats') 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 +} -- cgit v1.2.3