23 lines
657 B
PHP
23 lines
657 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
use function Pest\Laravel\get;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
it('ignores requests from normal users', function () {
|
|
// Arrange
|
|
actAsNormal();
|
|
get(route('admin.signInSheets.index'))
|
|
->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');
|
|
});
|