diff options
Diffstat (limited to 'src/mintdb/test_mintdb.c')
-rw-r--r-- | src/mintdb/test_mintdb.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mintdb/test_mintdb.c b/src/mintdb/test_mintdb.c index 99eb9b78c..9d9e1efa9 100644 --- a/src/mintdb/test_mintdb.c +++ b/src/mintdb/test_mintdb.c @@ -325,6 +325,28 @@ run (void *cls, plugin->have_deposit (plugin->cls, session, &deposit2)); + /* Tests for refreshing */ + { + struct TALER_MINTDB_RefreshSession refresh_session; + struct TALER_MINTDB_RefreshSession ret_refresh_session; + struct GNUNET_HashCode session_hash; + RND_BLK (&refresh_session); + RND_BLK (&session_hash); + refresh_session.num_oldcoins = UINT16_MAX; + refresh_session.num_newcoins = 1; + refresh_session.noreveal_index = 1; + FAILIF (GNUNET_OK != plugin->create_refresh_session (plugin->cls, + session, + &session_hash, + &refresh_session)); + FAILIF (GNUNET_OK != plugin->get_refresh_session (plugin->cls, + session, + &session_hash, + &ret_refresh_session)); + FAILIF (0 != memcmp (&ret_refresh_session, + &refresh_session, + sizeof (refresh_session))); + } result = 0; drop: |