mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Ensure user is stored
This commit is contained in:
parent
487d88c012
commit
9f832a93c9
|
@ -56,10 +56,12 @@ class CreateAccessoriesTest extends TestCase
|
|||
'notes' => 'Some notes here',
|
||||
];
|
||||
|
||||
$this->actingAs(User::factory()->createAccessories()->create())
|
||||
$user = User::factory()->createAccessories()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post(route('accessories.store'), array_merge($data, ['redirect_option' => 'index']))
|
||||
->assertRedirect(route('accessories.index'));
|
||||
|
||||
$this->assertDatabaseHas('accessories', $data);
|
||||
$this->assertDatabaseHas('accessories', array_merge($data, ['user_id' => $user->id]));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue