diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-06-11 13:38:47 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-06-11 13:38:47 +0200 |
commit | dc23f290eed04f22545e3146ab6a2fd56b02738f (patch) | |
tree | d6af1e021d72a304353ad9e622c854ffba36a251 /src/mintdb/test_mintdb.c | |
parent | edc6d380824a2076f7f095a71b8cb5d53f32f6ce (diff) |
fixing #3817
Diffstat (limited to 'src/mintdb/test_mintdb.c')
-rw-r--r-- | src/mintdb/test_mintdb.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mintdb/test_mintdb.c b/src/mintdb/test_mintdb.c index 74c1f66fe..56f5636d0 100644 --- a/src/mintdb/test_mintdb.c +++ b/src/mintdb/test_mintdb.c @@ -243,7 +243,8 @@ run (void *cls, struct TALER_MINTDB_CollectableBlindcoin *withdraw; struct TALER_MINTDB_Deposit deposit; struct TALER_MINTDB_Deposit deposit2; - struct json_t *wire; + json_t *wire; + json_t *just; const char * const json_wire_str = "{ \"type\":\"SEPA\", \ \"IBAN\":\"DE67830654080004822650\", \ @@ -285,24 +286,28 @@ run (void *cls, amount.fraction = 1; strcpy (amount.currency, CURRENCY); result = 4; + just = json_loads ("{ \"justification\":\"1\" }", 0, NULL); FAILIF (GNUNET_OK != plugin->reserves_in_insert (plugin->cls, session, &reserve_pub, &amount, - "justification 1")); + just)); + json_decref (just); FAILIF (GNUNET_OK != check_reserve (session, &reserve_pub, amount.value, amount.fraction, amount.currency)); + just = json_loads ("{ \"justification\":\"2\" }", 0, NULL); FAILIF (GNUNET_OK != plugin->reserves_in_insert (plugin->cls, session, &reserve_pub, &amount, - "justification 2")); + just)); + json_decref (just); FAILIF (GNUNET_OK != check_reserve (session, &reserve_pub, @@ -368,7 +373,7 @@ run (void *cls, FAILIF (1 != bt->amount.value); FAILIF (1 != bt->amount.fraction); FAILIF (0 != strcmp (CURRENCY, bt->amount.currency)); - FAILIF (NULL != bt->wire); /* FIXME: write wire details to db */ + FAILIF (NULL == bt->wire); break; case TALER_MINTDB_RO_WITHDRAW_COIN: withdraw = rh_head->details.withdraw; |