Skip to content
Snippets Groups Projects
Commit 577dc4c9 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-null-pointer-list-users' into 'dev'

F null pointer list users

See merge request !33
parents cfef2618 cb3dbe42
No related branches found
No related tags found
2 merge requests!41Release 0.3.0,!33F null pointer list users
Pipeline #53764 failed
......@@ -66,4 +66,22 @@ TEST(test_user, test_create_single_user_success) {
"transport or RPC protocol layer. Original error: 5 - This account does not exist.");
}
TEST(test_user, test_list_users) {
auto connection = ConnectionManager::GetDefaultConnection();
auto users = connection->ListUsers();
EXPECT_EQ(users.size(), 1);
User user("CaosDB", "user1");
user.SetPassword("Password1!");
connection->CreateSingleUser(user);
users = connection->ListUsers();
EXPECT_EQ(users.size(), 2);
connection->DeleteSingleUser("CaosDB", "user1");
users = connection->ListUsers();
EXPECT_EQ(users.size(), 1);
}
} // namespace caosdb::connection
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment