mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-15 15:55:50 +00:00
@ -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());
|
||||
|
||||
Reference in New Issue
Block a user