mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 05:47:28 -08:00
Updated tests
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
a23dee52f2
commit
74fbc23823
|
@ -38,11 +38,12 @@ class CreateLocationsTest extends TestCase
|
|||
$this->assertFalse(Location::where('name', 'Test Location')->exists());
|
||||
|
||||
$this->actingAs(User::factory()->superuser()->create())
|
||||
->from(route('locations.create'))
|
||||
->post(route('locations.store'), [
|
||||
'name' => 'Test Location',
|
||||
'parent_id' => '100000000'
|
||||
])
|
||||
->assertRedirect(route('locations.index'));
|
||||
->assertRedirect(route('locations.create'));
|
||||
|
||||
$this->assertFalse(Location::where('name', 'Test Location')->exists());
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ class UpdateLocationsTest extends TestCase
|
|||
'name' => 'Test Location',
|
||||
'parent_id' => '100000000'
|
||||
])
|
||||
->assertRedirect(route('locations.index'));
|
||||
->assertRedirect(route('locations.edit', ['location' => $location->id]));
|
||||
|
||||
$this->followRedirects($response)->assertSee(trans('general.error'));
|
||||
$this->assertFalse(Location::where('name', 'Test Location')->exists());
|
||||
|
|
Loading…
Reference in a new issue