mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix test
This commit is contained in:
parent
551111e7a1
commit
5078d80862
@ -245,12 +245,18 @@ TEST_F(TestJsonUpdateUserInfos, PasswordNotSecureEnough)
|
||||
TEST_F(TestJsonUpdateUserInfos, PasswordCorrect)
|
||||
{
|
||||
JsonUpdateUserInfos jsonCall(mUserSession);
|
||||
ASSERT_EQ(mUserSession->loadUser("Jeet_bb@gmail.com", "TestP4ssword&H"), USER_COMPLETE);
|
||||
|
||||
Poco::JSON::Object::Ptr update = new Poco::JSON::Object;
|
||||
|
||||
update->set("User.password", "uasjUs7ZS/as12");
|
||||
update->set("User.password_old", "TestP4ssword&H");
|
||||
|
||||
if ((ServerConfig::g_AllowUnsecureFlags & ServerConfig::UNSECURE_ALLOW_ALL_PASSWORDS) == ServerConfig::UNSECURE_ALLOW_ALL_PASSWORDS) {
|
||||
ASSERT_EQ(mUserSession->loadUser("Jeet_bb@gmail.com", "newPassword"), USER_COMPLETE);
|
||||
update->set("User.password_old", "newPassword");
|
||||
}
|
||||
else {
|
||||
ASSERT_EQ(mUserSession->loadUser("Jeet_bb@gmail.com", "TestP4ssword&H"), USER_COMPLETE);
|
||||
update->set("User.password_old", "TestP4ssword&H");
|
||||
}
|
||||
|
||||
auto params = chooseAccount(update);
|
||||
Profiler timeUsed;
|
||||
@ -269,11 +275,9 @@ TEST_F(TestJsonUpdateUserInfos, PasswordCorrect)
|
||||
ASSERT_FALSE(state.isEmpty());
|
||||
ASSERT_TRUE(state.isString());
|
||||
|
||||
|
||||
EXPECT_EQ(valid_values, 1);
|
||||
ASSERT_EQ(error_array.size(), 0);
|
||||
ASSERT_EQ(state.toString(), "success");
|
||||
|
||||
|
||||
delete result;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user