feature: user list
This commit is contained in:
@@ -30,11 +30,11 @@ class PasswordMd5Test extends TestCase
|
||||
'mail' => 'test@example.com',
|
||||
'pass' => md5('old_password'),
|
||||
'departments' => 1,
|
||||
'role' => User::ROLE_MEMBER,
|
||||
'status' => User::STATUS_ACTIVE,
|
||||
'role' => config('constants.ROLE_MEMBER'),
|
||||
'status' => config('constants.STATUS_ACTIVE'),
|
||||
'card' => 10,
|
||||
'flag_send' => User::FLAG_SEND_ENABLED,
|
||||
'first_login' => User::FIRST_LOGIN_TRUE,
|
||||
'flag_send' => config('constants.FLAG_SEND_ENABLED'),
|
||||
'first_login' => config('constants.FIRST_LOGIN_TRUE'),
|
||||
]);
|
||||
|
||||
$this->userService->updatePassword($user, 'new_secret_password');
|
||||
@@ -42,7 +42,7 @@ class PasswordMd5Test extends TestCase
|
||||
$user->refresh();
|
||||
|
||||
$this->assertEquals(md5('new_secret_password'), $user->pass);
|
||||
$this->assertEquals(User::FIRST_LOGIN_FALSE, $user->first_login);
|
||||
$this->assertEquals(config('constants.FIRST_LOGIN_FALSE'), $user->first_login);
|
||||
}
|
||||
|
||||
public function test_admin_service_create_user_stores_password_as_md5(): void
|
||||
@@ -53,7 +53,7 @@ class PasswordMd5Test extends TestCase
|
||||
'mail' => 'created@example.com',
|
||||
'departments' => 2,
|
||||
'password' => 'admin_created_pass',
|
||||
'role' => User::ROLE_MEMBER,
|
||||
'role' => config('constants.ROLE_MEMBER'),
|
||||
];
|
||||
|
||||
$this->adminService->createUser($data);
|
||||
@@ -62,6 +62,6 @@ class PasswordMd5Test extends TestCase
|
||||
|
||||
$this->assertNotNull($user);
|
||||
$this->assertEquals(md5('admin_created_pass'), $user->pass);
|
||||
$this->assertEquals(User::FIRST_LOGIN_TRUE, $user->first_login);
|
||||
$this->assertEquals(config('constants.FIRST_LOGIN_TRUE'), $user->first_login);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user