summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_get_product.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-16 23:32:58 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-16 23:32:58 +0200
commit843f00401878a2db69cea3d3a5f72f27bd763070 (patch)
tree7d4c0d51340c9db76c4e6fad3e826751d904bd9d /src/testing/testing_api_cmd_get_product.c
parenta7cc5eb7feda16ff48d3ca51514a1ae960bccd11 (diff)
downloadmerchant-843f00401878a2db69cea3d3a5f72f27bd763070.tar.gz
merchant-843f00401878a2db69cea3d3a5f72f27bd763070.tar.bz2
merchant-843f00401878a2db69cea3d3a5f72f27bd763070.zip
correct (product) image to be a string (as specified) instead of a JSON object
Diffstat (limited to 'src/testing/testing_api_cmd_get_product.c')
-rw-r--r--src/testing/testing_api_cmd_get_product.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/testing/testing_api_cmd_get_product.c b/src/testing/testing_api_cmd_get_product.c
index e65a3793..88050a42 100644
--- a/src/testing/testing_api_cmd_get_product.c
+++ b/src/testing/testing_api_cmd_get_product.c
@@ -98,7 +98,7 @@ get_product_cb (void *cls,
const json_t *description_i18n,
const char *unit,
const struct TALER_Amount *price,
- const json_t *image,
+ const char *image,
const json_t *taxes,
int64_t total_stock,
uint64_t total_sold,
@@ -178,14 +178,15 @@ get_product_cb (void *cls,
}
}
{
- const json_t *expected_image;
+ const char *expected_image;
+
if (GNUNET_OK !=
- TALER_TESTING_get_trait_json (product_cmd,
- 1,
- &expected_image))
+ TALER_TESTING_get_trait_string (product_cmd,
+ 3,
+ &expected_image))
TALER_TESTING_interpreter_fail (gis->is);
- if (1 != json_equal (image,
- expected_image))
+ if (0 != strcmp (image,
+ expected_image))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Product image does not match\n");