get(route('admin.bonus-scores.index')) ->assertRedirect(route('home')); actAsNormal(); $this->get(route('admin.bonus-scores.index')) ->assertRedirect(route('dashboard')) ->assertSessionHas('error', 'You are not authorized to perform this action'); actAsTab(); $this->get(route('admin.bonus-scores.index')) ->assertRedirect(route('dashboard')) ->assertSessionHas('error', 'You are not authorized to perform this action'); }); it('grants access to an administrator', function () { // Arrange actAsAdmin(); // Act & Assert $this->get(route('admin.bonus-scores.index')) ->assertOk() ->assertViewIs('admin.bonus-scores.index'); });