diff --git a/app/Http/Controllers/Admin/PrintSignInSheetsController.php b/app/Http/Controllers/Admin/PrintSignInSheetsController.php new file mode 100644 index 0000000..c3999eb --- /dev/null +++ b/app/Http/Controllers/Admin/PrintSignInSheetsController.php @@ -0,0 +1,13 @@ +prefix('admin/')-> Route::get('/', 'index')->name('admin.cards.index'); Route::post('/print', 'print')->name('admin.cards.print'); }); + + // Admin SignIn Sheet Routes + Route::prefix('signInSheets')->controller(PrintSignInSheetsController::class)->group(function () { + Route::get('/', 'index')->name('admin.signInSheets.index'); + }); }); diff --git a/tests/Feature/Pages/Admin/PrintSigninSheetsTest.php b/tests/Feature/Pages/Admin/PrintSigninSheetsTest.php new file mode 100644 index 0000000..11b28ed --- /dev/null +++ b/tests/Feature/Pages/Admin/PrintSigninSheetsTest.php @@ -0,0 +1,22 @@ +assertRedirect(route('dashboard')) + ->assertSessionHas('error', 'You are not authorized to perform this action'); +}); +it('ignores requests from tabulation users', function () { + // Arrange + actAsTab(); + get(route('admin.signInSheets.index')) + ->assertRedirect(route('dashboard')) + ->assertSessionHas('error', 'You are not authorized to perform this action'); +});