audition = Audition::factory()->create(); $this->r = route('seating.audition', $this->audition); }); it('denies access to a guest', function () { get($this->r) ->assertRedirect(route('home')); }); it('denies access to a normal user', function () { actAsNormal(); get($this->r) ->assertRedirect(route('dashboard')) ->assertSessionHas('error', 'You are not authorized to perform this action'); }); it('grants access to admin', function () { // Arrange actAsAdmin(); // Act & Assert get($this->r)->assertOk(); }); it('grants access to tabulators', function () { // Arrange actAsTab(); // Act & Assert get($this->r)->assertOk(); });