mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
adjust test for allow all password setting
This commit is contained in:
parent
2a3677f767
commit
2c29c20d8f
@ -72,12 +72,17 @@ TEST_F(TestJsonResetPassword, InvalidPassword)
|
||||
auto state = result->get("state");
|
||||
ASSERT_FALSE(state.isEmpty());
|
||||
ASSERT_TRUE(state.isString());
|
||||
ASSERT_EQ(state.toString(), "error");
|
||||
if ((ServerConfig::g_AllowUnsecureFlags & ServerConfig::UNSECURE_ALLOW_ALL_PASSWORDS) == ServerConfig::UNSECURE_ALLOW_ALL_PASSWORDS) {
|
||||
ASSERT_EQ(state.toString(), "success");
|
||||
}
|
||||
else {
|
||||
ASSERT_EQ(state.toString(), "error");
|
||||
|
||||
auto msg = result->get("msg");
|
||||
ASSERT_FALSE(msg.isEmpty());
|
||||
ASSERT_TRUE(msg.isString());
|
||||
ASSERT_EQ(msg.toString(), "password isn't valid");
|
||||
auto msg = result->get("msg");
|
||||
ASSERT_FALSE(msg.isEmpty());
|
||||
ASSERT_TRUE(msg.isString());
|
||||
ASSERT_EQ(msg.toString(), "password isn't valid");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(TestJsonResetPassword, ValidPassword)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user