mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Updated test
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
e8e3060a75
commit
9fe8a866e0
|
@ -51,7 +51,10 @@ class UpdateUserTest extends TestCase
|
||||||
'start_date' => '2021-08-01',
|
'start_date' => '2021-08-01',
|
||||||
'end_date' => '2025-12-31',
|
'end_date' => '2025-12-31',
|
||||||
])
|
])
|
||||||
->assertOk();
|
->assertOk()
|
||||||
|
->assertStatus(200)
|
||||||
|
->assertStatusMessageIs('success')
|
||||||
|
->json();
|
||||||
|
|
||||||
$user->refresh();
|
$user->refresh();
|
||||||
$this->assertEquals('Mabel', $user->first_name, 'First name was not updated');
|
$this->assertEquals('Mabel', $user->first_name, 'First name was not updated');
|
||||||
|
@ -98,12 +101,13 @@ class UpdateUserTest extends TestCase
|
||||||
'vip' => false,
|
'vip' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->actingAsForApi($admin)
|
$response = $this->actingAsForApi($admin)
|
||||||
->patchJson(route('api.users.update', $user), [
|
->putJson(route('api.users.update', $user), [
|
||||||
'first_name' => 'Mabel',
|
'first_name' => 'Mabel',
|
||||||
'last_name' => 'Mora',
|
'last_name' => 'Mora',
|
||||||
'username' => 'mabel',
|
'username' => 'mabel',
|
||||||
'password' => 'super-secret',
|
'password' => 'super-secret',
|
||||||
|
'password_confirmation' => 'super-secret',
|
||||||
'email' => 'mabel@onlymurderspod.com',
|
'email' => 'mabel@onlymurderspod.com',
|
||||||
'permissions' => '{"a.new.permission":"1"}',
|
'permissions' => '{"a.new.permission":"1"}',
|
||||||
'activated' => true,
|
'activated' => true,
|
||||||
|
@ -121,7 +125,10 @@ class UpdateUserTest extends TestCase
|
||||||
'start_date' => '2021-08-01',
|
'start_date' => '2021-08-01',
|
||||||
'end_date' => '2025-12-31',
|
'end_date' => '2025-12-31',
|
||||||
])
|
])
|
||||||
->assertOk();
|
->assertOk()
|
||||||
|
->assertStatus(200)
|
||||||
|
->assertStatusMessageIs('success')
|
||||||
|
->json();
|
||||||
|
|
||||||
$user->refresh();
|
$user->refresh();
|
||||||
$this->assertEquals('Mabel', $user->first_name, 'First name was not updated');
|
$this->assertEquals('Mabel', $user->first_name, 'First name was not updated');
|
||||||
|
|
Loading…
Reference in a new issue