Skip to content

A free open source IT asset/license management system

Implement test

Marcus Moore9b9516524a4b
diff --git a/app/Http/Controllers/Reports/CustomAccessoryReportController.php b/app/Http/Controllers/Reports/CustomAccessoryReportController.php
index 8abd19e8ed..908fa9fe71 100644
--- a/app/Http/Controllers/Reports/CustomAccessoryReportController.php
+++ b/app/Http/Controllers/Reports/CustomAccessoryReportController.php
@@ -30,5 +30,9 @@ class CustomAccessoryReportController extends Controller
]);
}
- public function run() {}
+ public function run()
+ {
+ ini_set('max_execution_time', env('REPORT_TIME_LIMIT', 12000)); // 12000 seconds = 200 minutes
+ $this->authorize('reports.view');
+ }
}
diff --git a/tests/Feature/Reporting/Custom/CustomAccessoryReportTest.php b/tests/Feature/Reporting/Custom/CustomAccessoryReportTest.php
index 011618c0af..03ab4e286b 100644
--- a/tests/Feature/Reporting/Custom/CustomAccessoryReportTest.php
+++ b/tests/Feature/Reporting/Custom/CustomAccessoryReportTest.php
@@ -18,7 +18,11 @@ class CustomAccessoryReportTest extends TestCase
public function test_requires_permission_to_run_report()
{
- $this->markTestIncomplete();
+ $this->actingAs(User::factory()->create())
+ ->post(route('reports.custom.accessory.run'), [
+ //
+ ])
+ ->assertForbidden();
}
public function test_can_load_custom_report_page()