diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index 5374c2d..dd56164 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -241,6 +241,14 @@ int main() database.storeUserWithoutNodes("anotherUser", password); if(!database.doesStoredUserExist("anotherUser")) fail("Added user 'anotherUser' to database without any nodes, but it doesn't seem to be stored"); + + auto adminUserGroups = database.getUserGroups(*databaseNode.getRequestHash(), adminUserKey->getPublicKey()); + if(adminUserGroups.size() != 1 || adminUserGroups[0].getView() != databaseCreateResponse->getNodeAdminGroupId()->getView()) + fail("Admin group doesn't match group stored in database"); + + auto userGroups = database.getUserGroups(*databaseNode.getRequestHash(), localUserKeyPair.getPublicKey()); + if(userGroups.size() != 1 || userGroups[0].getView() != databaseCreateResponse->getNodeAdminGroupId()->getView()) + fail("User group doesn't match group stored in database"); } Log::debug("Callback works when adding data while connected, now testing to reconnect and check if data remains..."); { |