Add test case

This commit is contained in:
Marcus Moore 2024-10-22 16:52:59 -07:00
parent d953519db6
commit 02c22c9efb
No known key found for this signature in database

View file

@ -40,4 +40,14 @@ class ShowReportTemplateTest extends TestCase implements TestsPermissionsRequire
return $templatePassedToView->is($reportTemplate);
}]);
}
public function testCannotLoadAnotherUsersSavedReportTemplate()
{
$reportTemplate = ReportTemplate::factory()->create();
$this->actingAs(User::factory()->canViewReports()->create())
->get(route('report-templates.show', $reportTemplate))
->assertRedirect(route('reports/custom'));
}
}