Skip to content

A free open source IT asset/license management system

Updated tests

snipe74fbc238230c
diff --git a/tests/Feature/Locations/Ui/CreateLocationsTest.php b/tests/Feature/Locations/Ui/CreateLocationsTest.php
index c6813c26b8..cfcb849025 100644
--- a/tests/Feature/Locations/Ui/CreateLocationsTest.php
+++ b/tests/Feature/Locations/Ui/CreateLocationsTest.php
@@ -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());
}
diff --git a/tests/Feature/Locations/Ui/UpdateLocationsTest.php b/tests/Feature/Locations/Ui/UpdateLocationsTest.php
index f8fa934b36..c692374cc7 100644
--- a/tests/Feature/Locations/Ui/UpdateLocationsTest.php
+++ b/tests/Feature/Locations/Ui/UpdateLocationsTest.php
@@ -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());