summaryrefslogtreecommitdiff
path: root/src/backenddb/test_merchantdb.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-08-31 14:17:18 +0200
committerChristian Grothoff <christian@grothoff.org>2017-08-31 14:17:18 +0200
commit7d50fee1384e44b007e8c00dd610eef2cedf1866 (patch)
tree76279e0428446bb937cb5474d4c24604b58b9f04 /src/backenddb/test_merchantdb.c
parent58bcfc40d82ceddf5db759ccd8de0ebf6b48e49c (diff)
downloadmerchant-7d50fee1384e44b007e8c00dd610eef2cedf1866.tar.gz
merchant-7d50fee1384e44b007e8c00dd610eef2cedf1866.tar.bz2
merchant-7d50fee1384e44b007e8c00dd610eef2cedf1866.zip
fix refund test and logic: if refund is smaller than refund that was previously awarded, that's not a hard error but simply 'no change required'
Diffstat (limited to 'src/backenddb/test_merchantdb.c')
-rw-r--r--src/backenddb/test_merchantdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index 212359d7..683ebdd8 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -592,7 +592,7 @@ run (void *cls)
json_object_set_new (contract_terms,
"order",
json_string ("1")));
-
+
contract_terms_future = json_object ();
GNUNET_assert (0 ==
json_object_set_new (contract_terms_future,
@@ -759,7 +759,7 @@ run (void *cls)
&merchant_pub,
&refund_amount,
"same refund amount as "
- "the previous one, should fail"));
+ "the previous one, should succeed without changes (0)"));
/*Should fail as this refund a lesser amount respect to the previous one*/
FAILIF (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
@@ -767,7 +767,7 @@ run (void *cls)
&h_contract_terms,
&merchant_pub,
&little_refund_amount,
- "make refund testing fail"));
+ "lower refund amount as the previous one, should succeed without changes (0)"));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->increase_refund_for_contract (plugin->cls,
&h_contract_terms,
@@ -775,17 +775,17 @@ run (void *cls)
&right_second_refund_amount,
"right refund increase"));
- FAILIF (GNUNET_DB_STATUS_HARD_ERROR !=
+ FAILIF (GNUNET_DB_STATUS_HARD_ERROR !=
plugin->increase_refund_for_contract (plugin->cls,
&h_contract_terms,
&merchant_pub,
&too_big_refund_amount,
"make refund testing fail due"
" to too big refund amount"));
-
+
FAILIF (GNUNET_OK !=
test_wire_fee ());
-
+
if (-1 == result)
result = 0;