diff options
-rwxr-xr-x | src/testing/test_merchant_reserve_creation.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/testing/test_merchant_reserve_creation.sh b/src/testing/test_merchant_reserve_creation.sh index 6a45e387..1c408a26 100755 --- a/src/testing/test_merchant_reserve_creation.sh +++ b/src/testing/test_merchant_reserve_creation.sh @@ -124,9 +124,9 @@ then exit_fail "Expected 1 account in response. got: $ACCOUNTS" fi -echo -n "authorizing tip ..." +echo -n "authorizing reward ..." -STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves/'"$RESERVE_PUB"'/authorize-tip' \ +STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves/'"$RESERVE_PUB"'/authorize-reward' \ -d '{"amount":"TESTKUDOS:1","justification":"off course","next_url":"https://taler.net/"}' \ -w "%{http_code}" -s -o "$LAST_RESPONSE") @@ -136,42 +136,42 @@ then fi echo "OK" -echo -n "Checking tip ..." -STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves/'"$RESERVE_PUB"'?tips=yes' \ +echo -n "Checking reward ..." +STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves/'"$RESERVE_PUB"'?rewards=yes' \ -w "%{http_code}" -s -o "$LAST_RESPONSE") -TIPS_SIZE=$(jq -r ".tips | length" < "$LAST_RESPONSE") +REWARDS_SIZE=$(jq -r ".rewards | length" < "$LAST_RESPONSE") -if [ "$TIPS_SIZE" != "1" ] +if [ "$REWARDS_SIZE" != "1" ] then cat "$LAST_RESPONSE" - exit_fail "Expected 1 tip. got: $TIPS_SIZE" + exit_fail "Expected 1 reward. got: $REWARDS_SIZE" fi -TIP_ID=$(jq -r .tips[0].tip_id < "$LAST_RESPONSE") +REWARD_ID=$(jq -r .rewards[0].reward_id < "$LAST_RESPONSE") echo "Found" -echo -n "Checking tip status ..." +echo -n "Checking reward status ..." -STATUS=$(curl 'http://localhost:9966/instances/default/private/tips/'"$TIP_ID" \ +STATUS=$(curl 'http://localhost:9966/instances/default/private/rewards/'"$REWARD_ID" \ -w "%{http_code}" -s -o "$LAST_RESPONSE") if [ "$STATUS" != "200" ] then cat "$LAST_RESPONSE" - exit_fail "Expected 200, tip found. got: $STATUS" + exit_fail "Expected 200, reward found. got: $STATUS" fi echo -n " ... " -STATUS=$(curl 'http://localhost:9966/instances/default/private/tips/'"$TIP_ID"'?pickups=yes' \ +STATUS=$(curl 'http://localhost:9966/instances/default/private/rewards/'"$REWARD_ID"'?pickups=yes' \ -w "%{http_code}" -s -o "$LAST_RESPONSE") if [ "$STATUS" != "200" ] then cat "$LAST_RESPONSE" - exit_fail "Expected 200, tip found. got: $STATUS" + exit_fail "Expected 200, reward found. got: $STATUS" fi echo "OK" |