From 4ed846df35290d0894fc4527261a7277041aea41 Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Wed, 30 Mar 2022 19:22:46 +0200 Subject: fix updated test Signed-off-by: Benjamin Brahmer --- tests/api/items.bats | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/api/items.bats b/tests/api/items.bats index f1ca82987..349678966 100644 --- a/tests/api/items.bats +++ b/tests/api/items.bats @@ -60,8 +60,7 @@ teardown() { STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${user} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" 2>&1| grep HTTP/) # client 2 checks for updates since last sync - UPDATED_ITEMS=$(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/items/updated id=$FEEDID lastModified=$SYNC_TIME | tr -d '[:space:]') + UPDATED_ITEMS=($(http --ignore-stdin -b -a ${user}:${user} GET ${BASE_URLv1}/items/updated id=$FEEDID lastModified=$SYNC_TIME | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')) - echo $UPDATED_ITEMS - false + assert_equal ${#ID_LIST[@]} ${#UPDATED_ITEMS[@]} } \ No newline at end of file -- cgit v1.2.3