summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_forget_order.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_forget_order.c')
-rw-r--r--src/testing/testing_api_cmd_forget_order.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/testing/testing_api_cmd_forget_order.c b/src/testing/testing_api_cmd_forget_order.c
index 5e6225d4..172ac295 100644
--- a/src/testing/testing_api_cmd_forget_order.c
+++ b/src/testing/testing_api_cmd_forget_order.c
@@ -120,7 +120,13 @@ order_forget_cb (void *cls,
ofs->ofh = NULL;
if (ofs->http_status != hr->http_status)
- TALER_TESTING_FAIL (ofs->is);
+ {
+ TALER_TESTING_unexpected_status_with_body (ofs->is,
+ hr->http_status,
+ ofs->http_status,
+ hr->reply);
+ return;
+ }
TALER_TESTING_interpreter_next (ofs->is);
}
@@ -138,12 +144,12 @@ order_forget_run (void *cls,
struct TALER_TESTING_Interpreter *is)
{
struct OrderForgetState *ofs = cls;
- const char **order_id;
+ const char *order_id;
ofs->is = is;
if (NULL != ofs->order_id)
{
- order_id = &ofs->order_id;
+ order_id = ofs->order_id;
}
else
{
@@ -159,13 +165,14 @@ order_forget_run (void *cls,
&order_id))
TALER_TESTING_FAIL (is);
}
- ofs->ofh = TALER_MERCHANT_order_forget (is->ctx,
- ofs->merchant_url,
- *order_id,
- ofs->paths_length,
- ofs->paths,
- &order_forget_cb,
- ofs);
+ ofs->ofh = TALER_MERCHANT_order_forget (
+ TALER_TESTING_interpreter_get_context (is),
+ ofs->merchant_url,
+ order_id,
+ ofs->paths_length,
+ ofs->paths,
+ &order_forget_cb,
+ ofs);
GNUNET_assert (NULL != ofs->ofh);
}
@@ -191,7 +198,7 @@ order_forget_traits (void *cls,
traits[0] = TALER_TESTING_make_trait_paths_length (&ofs->paths_length);
for (unsigned int i = 0; i < ofs->paths_length; ++i)
traits[i + 1] = TALER_TESTING_make_trait_paths (i,
- &ofs->paths[i]);
+ ofs->paths[i]);
traits[ofs->paths_length + 1] = TALER_TESTING_trait_end ();
return TALER_TESTING_get_trait (traits,