diff --git a/tests/Feature/Accessories/Ui/ShowAccessoryTest.php b/tests/Feature/Accessories/Ui/ShowAccessoryTest.php index 56d8fb42c..288ec9a50 100644 --- a/tests/Feature/Accessories/Ui/ShowAccessoryTest.php +++ b/tests/Feature/Accessories/Ui/ShowAccessoryTest.php @@ -26,7 +26,7 @@ class ShowAccessoryTest extends TestCase $this->actingAs($userForCompanyB) ->get(route('accessories.show', $accessoryForCompanyA)) - ->assertForbidden(); + ->assertStatus(302); } public function testCanViewAccessory() diff --git a/tests/Feature/Consumables/Ui/UpdateConsumableTest.php b/tests/Feature/Consumables/Ui/UpdateConsumableTest.php index e885daa59..dbb13b9ce 100644 --- a/tests/Feature/Consumables/Ui/UpdateConsumableTest.php +++ b/tests/Feature/Consumables/Ui/UpdateConsumableTest.php @@ -54,7 +54,7 @@ class UpdateConsumableTest extends TestCase ->put(route('consumables.update', $consumableForCompanyA), [ // ]) - ->assertForbidden(); + ->assertStatus(302); } public function testCannotSetQuantityToAmountLowerThanWhatIsCheckedOut() diff --git a/tests/Feature/ReportTemplates/DeleteReportTemplateTest.php b/tests/Feature/ReportTemplates/DeleteReportTemplateTest.php index 2b108443a..cebc8156a 100644 --- a/tests/Feature/ReportTemplates/DeleteReportTemplateTest.php +++ b/tests/Feature/ReportTemplates/DeleteReportTemplateTest.php @@ -17,7 +17,7 @@ class DeleteReportTemplateTest extends TestCase implements TestsPermissionsRequi $this->actingAs(User::factory()->create()) ->post(route('report-templates.destroy', $reportTemplate->id)) - ->assertNotFound(); + ->assertStatus(302); $this->assertModelExists($reportTemplate); } @@ -28,7 +28,7 @@ class DeleteReportTemplateTest extends TestCase implements TestsPermissionsRequi $this->actingAs(User::factory()->canViewReports()->create()) ->delete(route('report-templates.destroy', $reportTemplate->id)) - ->assertNotFound(); + ->assertStatus(302); $this->assertModelExists($reportTemplate); } diff --git a/tests/Feature/ReportTemplates/EditReportTemplateTest.php b/tests/Feature/ReportTemplates/EditReportTemplateTest.php index 88363ec8b..d359baddd 100644 --- a/tests/Feature/ReportTemplates/EditReportTemplateTest.php +++ b/tests/Feature/ReportTemplates/EditReportTemplateTest.php @@ -15,7 +15,7 @@ class EditReportTemplateTest extends TestCase implements TestsPermissionsRequire { $this->actingAs(User::factory()->create()) ->get(route('report-templates.edit', ReportTemplate::factory()->create())) - ->assertNotFound(); + ->assertStatus(302); } public function testCannotLoadEditPageForAnotherUsersReportTemplate() @@ -25,7 +25,7 @@ class EditReportTemplateTest extends TestCase implements TestsPermissionsRequire $this->actingAs($user) ->get(route('report-templates.edit', $reportTemplate)) - ->assertNotFound(); + ->assertStatus(302); } public function testCanLoadEditReportTemplatePage() diff --git a/tests/Feature/ReportTemplates/ShowReportTemplateTest.php b/tests/Feature/ReportTemplates/ShowReportTemplateTest.php index 3e57db898..748df288b 100644 --- a/tests/Feature/ReportTemplates/ShowReportTemplateTest.php +++ b/tests/Feature/ReportTemplates/ShowReportTemplateTest.php @@ -15,7 +15,7 @@ class ShowReportTemplateTest extends TestCase implements TestsPermissionsRequire { $this->actingAs(User::factory()->create()) ->get(route('report-templates.show', ReportTemplate::factory()->create())) - ->assertNotFound(); + ->assertStatus(302); } public function testCanLoadASavedReportTemplate() @@ -38,6 +38,6 @@ class ShowReportTemplateTest extends TestCase implements TestsPermissionsRequire $this->actingAs(User::factory()->canViewReports()->create()) ->get(route('report-templates.show', $reportTemplate)) - ->assertNotFound(); + ->assertStatus(302); } } diff --git a/tests/Feature/ReportTemplates/UpdateReportTemplateTest.php b/tests/Feature/ReportTemplates/UpdateReportTemplateTest.php index 9afecb084..09c168b27 100644 --- a/tests/Feature/ReportTemplates/UpdateReportTemplateTest.php +++ b/tests/Feature/ReportTemplates/UpdateReportTemplateTest.php @@ -15,14 +15,14 @@ class UpdateReportTemplateTest extends TestCase implements TestsPermissionsRequi { $this->actingAs(User::factory()->create()) ->post(route('report-templates.update', ReportTemplate::factory()->create())) - ->assertNotFound(); + ->assertStatus(302); } public function testCannotUpdateAnotherUsersReportTemplate() { $this->actingAs(User::factory()->canViewReports()->create()) ->post(route('report-templates.update', ReportTemplate::factory()->create())) - ->assertNotFound(); + ->assertStatus(302); } public function testUpdatingReportTemplateRequiresValidFields() diff --git a/tests/Feature/Users/Ui/ViewUserTest.php b/tests/Feature/Users/Ui/ViewUserTest.php index 6b85d32ff..cb21a1e9e 100644 --- a/tests/Feature/Users/Ui/ViewUserTest.php +++ b/tests/Feature/Users/Ui/ViewUserTest.php @@ -21,7 +21,7 @@ class ViewUserTest extends TestCase $this->actingAs(User::factory()->editUsers()->for($companyA)->create()) ->get(route('users.show', $user)) - ->assertStatus(403); + ->assertStatus(302); $this->actingAs($superuser) ->get(route('users.show', $user))