mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Add test case
This commit is contained in:
parent
d953519db6
commit
02c22c9efb
|
@ -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'));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue