From 3de5f5882cd881dad0d7dbea074284d3bb5fd25f Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 11 Feb 2025 01:07:41 +0000 Subject: [PATCH] Added/updated tests Signed-off-by: snipe --- .../Categories/Api/CreateCategoriesTest.php | 2 + .../Categories/Api/UpdateCategoriesTest.php | 4 ++ .../Categories/Ui/CreateCategoriesTest.php | 7 +-- .../Categories/Ui/UpdateCategoriesTest.php | 11 ++-- .../Departments/Api/CreateDepartmentsTest.php | 19 +++++++ .../Departments/Api/UpdateDepartmentsTest.php | 2 + .../Departments/Ui/CreateDepartmentsTest.php | 5 +- .../Departments/Ui/UpdateDepartmentsTest.php | 3 +- tests/Feature/Groups/Api/StoreGroupTest.php | 3 +- tests/Feature/Groups/Ui/CreateGroupTest.php | 15 ++++++ tests/Feature/Groups/Ui/UpdateGroupTest.php | 18 +++++++ .../Locations/Api/CreateLocationsTest.php | 20 ++++++++ .../Locations/Api/UpdateLocationsTest.php | 6 ++- .../Locations/Ui/CreateLocationsTest.php | 4 +- .../Locations/Ui/UpdateLocationsTest.php | 3 +- .../Api/CreateManufacturersTest.php | 39 +++++++++++++++ .../Api/UpdateManufacturersTest.php | 50 +++++++++++++++++++ .../Ui/CreateManufacturerTest.php | 16 ++++++ .../Ui/UpdateManufacturerTest.php | 19 +++++++ 19 files changed, 230 insertions(+), 16 deletions(-) create mode 100644 tests/Feature/Manufacturers/Api/CreateManufacturersTest.php create mode 100644 tests/Feature/Manufacturers/Api/UpdateManufacturersTest.php diff --git a/tests/Feature/Categories/Api/CreateCategoriesTest.php b/tests/Feature/Categories/Api/CreateCategoriesTest.php index fc464242af29..2a4a0661a6eb 100644 --- a/tests/Feature/Categories/Api/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Api/CreateCategoriesTest.php @@ -27,6 +27,7 @@ public function testCanCreateCategoryWithValidCategoryType() 'name' => 'Test Category', 'eula_text' => 'Test EULA', 'category_type' => 'accessory', + 'notes' => 'Test Note', ]) ->assertOk() ->assertStatusMessageIs('success') @@ -38,6 +39,7 @@ public function testCanCreateCategoryWithValidCategoryType() $category = Category::find($response['payload']['id']); $this->assertEquals('Test Category', $category->name); $this->assertEquals('Test EULA', $category->eula_text); + $this->assertEquals('Test Note', $category->notes); $this->assertEquals('accessory', $category->category_type); } diff --git a/tests/Feature/Categories/Api/UpdateCategoriesTest.php b/tests/Feature/Categories/Api/UpdateCategoriesTest.php index 1a784c11795f..6d6bc8da10eb 100644 --- a/tests/Feature/Categories/Api/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Api/UpdateCategoriesTest.php @@ -17,6 +17,7 @@ public function testCanUpdateCategoryViaPatchWithoutCategoryType() ->patchJson(route('api.categories.update', $category), [ 'name' => 'Test Category', 'eula_text' => 'Test EULA', + 'notes' => 'Test Note', ]) ->assertOk() ->assertStatusMessageIs('success') @@ -27,6 +28,7 @@ public function testCanUpdateCategoryViaPatchWithoutCategoryType() $category->refresh(); $this->assertEquals('Test Category', $category->name, 'Name was not updated'); $this->assertEquals('Test EULA', $category->eula_text, 'EULA was not updated'); + $this->assertEquals('Test Note', $category->notes, 'Note was not updated'); } @@ -39,6 +41,7 @@ public function testCannotUpdateCategoryViaPatchWithCategoryType() 'name' => 'Test Category', 'eula_text' => 'Test EULA', 'category_type' => 'accessory', + 'note' => 'Test Note', ]) ->assertOk() ->assertStatusMessageIs('error') @@ -48,6 +51,7 @@ public function testCannotUpdateCategoryViaPatchWithCategoryType() $category->refresh(); $this->assertNotEquals('Test Category', $category->name, 'Name was not updated'); $this->assertNotEquals('Test EULA', $category->eula_text, 'EULA was not updated'); + $this->assertNotEquals('Test Note', $category->notes, 'Note was not updated'); $this->assertNotEquals('accessory', $category->category_type, 'EULA was not updated'); } diff --git a/tests/Feature/Categories/Ui/CreateCategoriesTest.php b/tests/Feature/Categories/Ui/CreateCategoriesTest.php index 45e821d9d95d..694b61c613b1 100644 --- a/tests/Feature/Categories/Ui/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/CreateCategoriesTest.php @@ -33,11 +33,12 @@ public function testUserCanCreateCategories() $this->actingAs(User::factory()->superuser()->create()) ->post(route('categories.store'), [ 'name' => 'Test Category', - 'category_type' => 'asset' + 'category_type' => 'asset', + 'notes' => 'Test Note', ]) ->assertRedirect(route('categories.index')); - $this->assertTrue(Category::where('name', 'Test Category')->exists()); + $this->assertTrue(Category::where('name', 'Test Category')->where('notes', 'Test Note')->exists()); } public function testUserCannotCreateCategoriesWithInvalidType() @@ -48,7 +49,7 @@ public function testUserCannotCreateCategoriesWithInvalidType() ->from(route('categories.create')) ->post(route('categories.store'), [ 'name' => 'Test Category', - 'category_type' => 'invalid' + 'category_type' => 'invalid', ]) ->assertRedirect(route('categories.create')); diff --git a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php index 901b7795821e..7e61097793f3 100644 --- a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php @@ -32,7 +32,7 @@ public function testUserCanCreateCategories() $this->actingAs(User::factory()->superuser()->create()) ->post(route('categories.store'), [ 'name' => 'Test Category', - 'category_type' => 'asset' + 'category_type' => 'asset', ]) ->assertStatus(302) ->assertSessionHasNoErrors() @@ -49,13 +49,14 @@ public function testUserCanEditAssetCategory() $response = $this->actingAs(User::factory()->superuser()->create()) ->put(route('categories.update', ['category' => $category]), [ 'name' => 'Test Category Edited', + 'notes' => 'Test Note Edited', ]) ->assertStatus(302) ->assertSessionHasNoErrors() ->assertRedirect(route('categories.index')); $this->followRedirects($response)->assertSee('Success'); - $this->assertTrue(Category::where('name', 'Test Category Edited')->exists()); + $this->assertTrue(Category::where('name', 'Test Category Edited')->where('notes', 'Test Note Edited')->exists()); } @@ -69,13 +70,14 @@ public function testUserCanChangeCategoryTypeIfNoAssetsAssociated() ->put(route('categories.update', ['category' => $category]), [ 'name' => 'Test Category Edited', 'category_type' => 'accessory', + 'notes' => 'Test Note Edited', ]) ->assertSessionHasNoErrors() ->assertStatus(302) ->assertRedirect(route('categories.index')); $this->followRedirects($response)->assertSee('Success'); - $this->assertTrue(Category::where('name', 'Test Category Edited')->exists()); + $this->assertTrue(Category::where('name', 'Test Category Edited')->where('notes', 'Test Note Edited')->exists()); } @@ -89,6 +91,7 @@ public function testUserCannotChangeCategoryTypeIfAssetsAreAssociated() ->put(route('categories.update', ['category' => $category]), [ 'name' => 'Test Category Edited', 'category_type' => 'accessory', + 'notes' => 'Test Note Edited', ]) ->assertSessionHasErrors(['category_type']) ->assertInvalid(['category_type']) @@ -96,7 +99,7 @@ public function testUserCannotChangeCategoryTypeIfAssetsAreAssociated() ->assertRedirect(route('categories.edit', ['category' => $category->id])); $this->followRedirects($response)->assertSee(trans('general.error')); - $this->assertFalse(Category::where('name', 'Test Category Edited')->exists()); + $this->assertFalse(Category::where('name', 'Test Category Edited')->where('notes', 'Test Note Edited')->exists()); } diff --git a/tests/Feature/Departments/Api/CreateDepartmentsTest.php b/tests/Feature/Departments/Api/CreateDepartmentsTest.php index a8725c5ff2d9..e0f975dd7f41 100644 --- a/tests/Feature/Departments/Api/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/CreateDepartmentsTest.php @@ -20,4 +20,23 @@ public function testRequiresPermissionToCreateDepartment() ->assertForbidden(); } + public function testCanCreateDepartment() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.departments.store'), [ + 'name' => 'Test Department', + 'notes' => 'Test Note', + ]) + ->assertOk() + ->assertStatusMessageIs('success') + ->assertStatus(200) + ->json(); + + $this->assertTrue(Department::where('name', 'Test Department')->exists()); + + $department = Department::find($response['payload']['id']); + $this->assertEquals('Test Department', $department->name); + $this->assertEquals('Test Note', $department->notes); + } + } diff --git a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php index 2a6401e7f121..b4eb38301a88 100644 --- a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php @@ -25,6 +25,7 @@ public function testCanUpdateDepartmentViaPatch() $this->actingAsForApi(User::factory()->superuser()->create()) ->patchJson(route('api.departments.update', $department), [ 'name' => 'Test Department', + 'notes' => 'Test Note', ]) ->assertOk() ->assertStatusMessageIs('success') @@ -33,6 +34,7 @@ public function testCanUpdateDepartmentViaPatch() $department->refresh(); $this->assertEquals('Test Department', $department->name, 'Name was not updated'); + $this->assertEquals('Test Note', $department->notes, 'Note was not updated'); } diff --git a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php index 08dc12ba09de..f20a2c7b6ac1 100644 --- a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php @@ -34,11 +34,12 @@ public function testUserCanCreateDepartments() $this->actingAs(User::factory()->superuser()->create()) ->post(route('departments.store'), [ 'name' => 'Test Department', - 'company_id' => Company::factory()->create()->id + 'company_id' => Company::factory()->create()->id, + 'notes' => 'Test Note', ]) ->assertRedirect(route('departments.index')); - $this->assertTrue(Department::where('name', 'Test Department')->exists()); + $this->assertTrue(Department::where('name', 'Test Department')->where('notes', 'Test Note')->exists()); } diff --git a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php index 71f7cfe477fd..bb5fc27e14a0 100644 --- a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php @@ -34,13 +34,14 @@ public function testUserCanEditDepartments() $response = $this->actingAs(User::factory()->superuser()->create()) ->put(route('departments.update', ['department' => $department]), [ 'name' => 'Test Department Edited', + 'notes' => 'Test Note Edited', ]) ->assertStatus(302) ->assertSessionHasNoErrors() ->assertRedirect(route('departments.index')); $this->followRedirects($response)->assertSee('Success'); - $this->assertTrue(Department::where('name', 'Test Department Edited')->exists()); + $this->assertTrue(Department::where('name', 'Test Department Edited')->where('notes', 'Test Note Edited')->exists()); } diff --git a/tests/Feature/Groups/Api/StoreGroupTest.php b/tests/Feature/Groups/Api/StoreGroupTest.php index ebcbff71c504..484c921a6ca7 100644 --- a/tests/Feature/Groups/Api/StoreGroupTest.php +++ b/tests/Feature/Groups/Api/StoreGroupTest.php @@ -21,6 +21,7 @@ public function testCanStoreGroupWithPermissionsPassed() $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.groups.store'), [ 'name' => 'My Awesome Group', + 'notes' => 'My Awesome Note', 'permissions' => [ 'admin' => '1', 'import' => '1', @@ -29,7 +30,7 @@ public function testCanStoreGroupWithPermissionsPassed() ]) ->assertOk(); - $group = Group::where('name', 'My Awesome Group')->first(); + $group = Group::where('name', 'My Awesome Group')->where('notes', 'My Awesome Note')->first(); $this->assertNotNull($group); $this->assertEquals('1', $group->decodePermissions()['admin']); diff --git a/tests/Feature/Groups/Ui/CreateGroupTest.php b/tests/Feature/Groups/Ui/CreateGroupTest.php index 56b3a7605386..796905c50fbb 100644 --- a/tests/Feature/Groups/Ui/CreateGroupTest.php +++ b/tests/Feature/Groups/Ui/CreateGroupTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Groups\Ui; +use App\Models\Group; use App\Models\User; use Tests\TestCase; @@ -13,4 +14,18 @@ public function testPageRenders() ->get(route('groups.create')) ->assertOk(); } + + public function testUserCanCreateGroup() + { + $this->assertFalse(Group::where('name', 'Test Group')->exists()); + + $this->actingAs(User::factory()->superuser()->create()) + ->post(route('groups.store'), [ + 'name' => 'Test Group', + 'notes' => 'Test Note', + ]) + ->assertRedirect(route('groups.index')); + + $this->assertTrue(Group::where('name', 'Test Group')->where('notes', 'Test Note')->exists()); + } } diff --git a/tests/Feature/Groups/Ui/UpdateGroupTest.php b/tests/Feature/Groups/Ui/UpdateGroupTest.php index c68d7cb84b18..edb236872645 100644 --- a/tests/Feature/Groups/Ui/UpdateGroupTest.php +++ b/tests/Feature/Groups/Ui/UpdateGroupTest.php @@ -14,4 +14,22 @@ public function testPageRenders() ->get(route('groups.edit', Group::factory()->create()->id)) ->assertOk(); } + + public function testUserCanEditGroups() + { + $group = Group::factory()->create(['name' => 'Test Group']); + $this->assertTrue(Group::where('name', 'Test Group')->exists()); + + $response = $this->actingAs(User::factory()->superuser()->create()) + ->put(route('groups.update', ['group' => $group]), [ + 'name' => 'Test Group Edited', + 'notes' => 'Test Note Edited', + ]) + ->assertStatus(302) + ->assertSessionHasNoErrors() + ->assertRedirect(route('groups.index')); + + $this->followRedirects($response)->assertSee('Success'); + $this->assertTrue(Group::where('name', 'Test Group Edited')->where('notes', 'Test Note Edited')->exists()); + } } diff --git a/tests/Feature/Locations/Api/CreateLocationsTest.php b/tests/Feature/Locations/Api/CreateLocationsTest.php index 171508b72519..0a75517f31dd 100644 --- a/tests/Feature/Locations/Api/CreateLocationsTest.php +++ b/tests/Feature/Locations/Api/CreateLocationsTest.php @@ -16,6 +16,26 @@ public function testRequiresPermissionToCreateLocation() ->assertForbidden(); } + + public function testCanCreateLocation() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.locations.store'), [ + 'name' => 'Test Location', + 'notes' => 'Test Note', + ]) + ->assertOk() + ->assertStatusMessageIs('success') + ->assertStatus(200) + ->json(); + + $this->assertTrue(Location::where('name', 'Test Location')->exists()); + + $department = Location::find($response['payload']['id']); + $this->assertEquals('Test Location', $department->name); + $this->assertEquals('Test Note', $department->notes); + } + public function testCannotCreateNewLocationsWithTheSameName() { $location = Location::factory()->create(); diff --git a/tests/Feature/Locations/Api/UpdateLocationsTest.php b/tests/Feature/Locations/Api/UpdateLocationsTest.php index a3dd8c228c38..a169ba87bfa9 100644 --- a/tests/Feature/Locations/Api/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Api/UpdateLocationsTest.php @@ -22,7 +22,8 @@ public function testCanUpdateLocationViaPatch() $this->actingAsForApi(User::factory()->superuser()->create()) ->patchJson(route('api.locations.update', $location), [ - 'name' => 'Test Location', + 'name' => 'Test Updated Location', + 'notes' => 'Test Updated Note', ]) ->assertOk() ->assertStatusMessageIs('success') @@ -30,7 +31,8 @@ public function testCanUpdateLocationViaPatch() ->json(); $location->refresh(); - $this->assertEquals('Test Location', $location->name, 'Name was not updated'); + $this->assertEquals('Test Updated Location', $location->name, 'Name was not updated'); + $this->assertEquals('Test Updated Note', $location->notes, 'Note was not updated'); } diff --git a/tests/Feature/Locations/Ui/CreateLocationsTest.php b/tests/Feature/Locations/Ui/CreateLocationsTest.php index 2e2e1e0aa91f..794ee06c67e9 100644 --- a/tests/Feature/Locations/Ui/CreateLocationsTest.php +++ b/tests/Feature/Locations/Ui/CreateLocationsTest.php @@ -33,11 +33,11 @@ public function testUserCanCreateLocations() $this->actingAs(User::factory()->superuser()->create()) ->post(route('locations.store'), [ 'name' => 'Test Location', - 'company_id' => Company::factory()->create()->id + 'notes' => 'Test Note', ]) ->assertRedirect(route('locations.index')); - $this->assertTrue(Location::where('name', 'Test Location')->exists()); + $this->assertTrue(Location::where('name', 'Test Location')->where('notes', 'Test Note')->exists()); } public function testUserCannotCreateLocationsWithInvalidParent() diff --git a/tests/Feature/Locations/Ui/UpdateLocationsTest.php b/tests/Feature/Locations/Ui/UpdateLocationsTest.php index 6cead815bc4b..c38ee25f8ec5 100644 --- a/tests/Feature/Locations/Ui/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Ui/UpdateLocationsTest.php @@ -33,13 +33,14 @@ public function testUserCanEditLocations() $response = $this->actingAs(User::factory()->superuser()->create()) ->put(route('locations.update', ['location' => $location]), [ 'name' => 'Test Location Edited', + 'notes' => 'Test Note Edited', ]) ->assertStatus(302) ->assertSessionHasNoErrors() ->assertRedirect(route('locations.index')); $this->followRedirects($response)->assertSee('Success'); - $this->assertTrue(Location::where('name', 'Test Location Edited')->exists()); + $this->assertTrue(Location::where('name', 'Test Location Edited')->where('notes', 'Test Note Edited')->exists()); } public function testUserCannotEditLocationsToMakeThemTheirOwnParent() diff --git a/tests/Feature/Manufacturers/Api/CreateManufacturersTest.php b/tests/Feature/Manufacturers/Api/CreateManufacturersTest.php new file mode 100644 index 000000000000..9dc953148e4f --- /dev/null +++ b/tests/Feature/Manufacturers/Api/CreateManufacturersTest.php @@ -0,0 +1,39 @@ +actingAsForApi(User::factory()->create()) + ->postJson(route('api.departments.store')) + ->assertForbidden(); + } + + public function testCanCreateManufacturer() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.manufacturers.store'), [ + 'name' => 'Test Manufacturer', + 'notes' => 'Test Note', + ]) + ->assertOk() + ->assertStatusMessageIs('success') + ->assertStatus(200) + ->json(); + + $this->assertTrue(Manufacturer::where('name', 'Test Manufacturer')->where('notes', 'Test Note')->exists()); + + $manufacturer = Manufacturer::find($response['payload']['id']); + $this->assertEquals('Test Manufacturer', $manufacturer->name); + $this->assertEquals('Test Note', $manufacturer->notes); + } + +} diff --git a/tests/Feature/Manufacturers/Api/UpdateManufacturersTest.php b/tests/Feature/Manufacturers/Api/UpdateManufacturersTest.php new file mode 100644 index 000000000000..d3ab461b4f59 --- /dev/null +++ b/tests/Feature/Manufacturers/Api/UpdateManufacturersTest.php @@ -0,0 +1,50 @@ +actingAs(User::factory()->create()) + ->post(route('manufacturers.store'), [ + 'name' => 'Test Manufacturer', + ]) + ->assertStatus(403) + ->assertForbidden(); + } + + public function testPageRenders() + { + $this->actingAs(User::factory()->superuser()->create()) + ->get(route('manufacturers.edit', Manufacturer::factory()->create()->id)) + ->assertOk(); + } + + public function testUserCanEditManufacturers() + { + $department = Manufacturer::factory()->create(['name' => 'Test Manufacturer']); + $this->assertTrue(Manufacturer::where('name', 'Test Manufacturer')->exists()); + + $response = $this->actingAs(User::factory()->superuser()->create()) + ->put(route('manufacturers.update', ['manufacturer' => $department]), [ + 'name' => 'Test Manufacturer Edited', + 'notes' => 'Test Note Edited', + ]) + ->assertStatus(302) + ->assertSessionHasNoErrors() + ->assertRedirect(route('manufacturers.index')); + + $this->followRedirects($response)->assertSee('Success'); + $this->assertTrue(Manufacturer::where('name', 'Test Manufacturer Edited')->where('notes', 'Test Note Edited')->exists()); + + } + + + +} diff --git a/tests/Feature/Manufacturers/Ui/CreateManufacturerTest.php b/tests/Feature/Manufacturers/Ui/CreateManufacturerTest.php index 133b271ea3b3..4eb9d4fb7ec8 100644 --- a/tests/Feature/Manufacturers/Ui/CreateManufacturerTest.php +++ b/tests/Feature/Manufacturers/Ui/CreateManufacturerTest.php @@ -3,6 +3,7 @@ namespace Tests\Feature\Manufacturers\Ui; use App\Models\User; +use App\Models\Manufacturer; use Tests\TestCase; class CreateManufacturerTest extends TestCase @@ -13,4 +14,19 @@ public function testPageRenders() ->get(route('manufacturers.create')) ->assertOk(); } + + public function testUserCanCreateManufacturer() + { + $this->assertFalse(Manufacturer::where('name', 'Test Manufacturer')->exists()); + + $this->actingAs(User::factory()->superuser()->create()) + ->post(route('manufacturers.store'), [ + 'name' => 'Test Manufacturer', + 'notes' => 'Test Note', + ]) + ->assertRedirect(route('manufacturers.index')); + + $this->assertTrue(Manufacturer::where('name', 'Test Manufacturer')->where('notes', 'Test Note')->exists()); + } + } diff --git a/tests/Feature/Manufacturers/Ui/UpdateManufacturerTest.php b/tests/Feature/Manufacturers/Ui/UpdateManufacturerTest.php index e2f7724fa30f..398b7fe2393c 100644 --- a/tests/Feature/Manufacturers/Ui/UpdateManufacturerTest.php +++ b/tests/Feature/Manufacturers/Ui/UpdateManufacturerTest.php @@ -14,4 +14,23 @@ public function testPageRenders() ->get(route('manufacturers.edit', Manufacturer::factory()->create()->id)) ->assertOk(); } + + public function testUserCanEditManufacturers() + { + $manufacturer = Manufacturer::factory()->create(['name' => 'Test Manufacturer']); + $this->assertTrue(Manufacturer::where('name', 'Test Manufacturer')->exists()); + + $response = $this->actingAs(User::factory()->superuser()->create()) + ->put(route('manufacturers.update', ['manufacturer' => $manufacturer]), [ + 'name' => 'Test Manufacturer Edited', + 'notes' => 'Test Note Edited', + ]) + ->assertStatus(302) + ->assertSessionHasNoErrors() + ->assertRedirect(route('manufacturers.index')); + + $this->followRedirects($response)->assertSee('Success'); + $this->assertTrue(Manufacturer::where('name', 'Test Manufacturer Edited')->where('notes', 'Test Note Edited')->exists()); + } + }