merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit e4d78aa6481a6a3d93e46ebcf8963bbfb617241b
parent 00d9973f0cef81425d28d95dc23731424b37fc63
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 30 Oct 2025 20:55:23 +0100

add test for #9510

Diffstat:
Msrc/testing/test_merchant_product_creation.sh | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/testing/test_merchant_product_creation.sh b/src/testing/test_merchant_product_creation.sh @@ -295,12 +295,9 @@ then cat "$LAST_RESPONSE" exit_fail "Expected 204, updating product. got: $STATUS" fi -echo " OK" - -bash echo -n "Requesting inventory..." -STATUS=$(curl 'http://localhost:9966/private/products' \ +STATUS=$(curl 'http://localhost:9966/private/products?name_filter=more' \ -w "%{http_code}" -s -o "$LAST_RESPONSE") if [ "$STATUS" != "200" ] @@ -309,6 +306,13 @@ then exit_fail "Expected 200. got: $STATUS" fi -cat "$LAST_RESPONSE" +PRODUCT_COUNT=$(jq -r '.products|length' < "$LAST_RESPONSE") + +if [ "$PRODUCT_COUNT" != "1" ] +then + cat "$LAST_RESPONSE" + exit_fail "Expected one product for the 'more'. filter, got: $PRODUCT_COUNT" +fi +echo " OK" exit 0