summaryrefslogtreecommitdiff
path: root/src/exchangedb/test_exchangedb.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-07-10 15:37:56 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-07-10 15:37:56 +0200
commit6801c690b765794d839712361b87c046a2bd59e0 (patch)
tree8232499859073fd04c55191823f0591eda9e53d3 /src/exchangedb/test_exchangedb.c
parent61e737f03e85d1e68bb5b58228b9937f8269038c (diff)
downloadexchange-6801c690b765794d839712361b87c046a2bd59e0.tar.gz
exchange-6801c690b765794d839712361b87c046a2bd59e0.tar.bz2
exchange-6801c690b765794d839712361b87c046a2bd59e0.zip
Test last change.
Diffstat (limited to 'src/exchangedb/test_exchangedb.c')
-rw-r--r--src/exchangedb/test_exchangedb.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c
index 5be7ecb7..07372cfb 100644
--- a/src/exchangedb/test_exchangedb.c
+++ b/src/exchangedb/test_exchangedb.c
@@ -364,20 +364,32 @@ kcs (void *cls,
struct TALER_EXCHANGEDB_Session *session = cls;
struct TALER_Amount amount;
+ struct TALER_Amount sum;
TALER_amount_get_zero (CURRENCY,
&amount);
+ amount.value = 30;
FAILIF
(GNUNET_OK != plugin->insert_kyc_event (NULL,
session,
merchant_serial_id,
&amount));
+ amount.value = 20;
+ amount.fraction = 70;
FAILIF
(GNUNET_OK != plugin->insert_kyc_event (NULL,
session,
merchant_serial_id,
&amount));
+ FAILIF
+ (0 >= plugin->get_kyc_events (NULL,
+ session,
+ merchant_serial_id,
+ &sum));
+
+ FAILIF ((50 != sum.value) || (70 != sum.fraction));
+
drop:
return;
}