mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-11 16:52:09 +00:00
103 - Preventing Guests from Adding New Concerts
This commit is contained in:
@@ -11,4 +11,23 @@ use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
class AddConcertTest extends TestCase
|
||||
{
|
||||
use DatabaseMigrations;
|
||||
|
||||
/** @test */
|
||||
function promoters_can_view_the_add_concert_form()
|
||||
{
|
||||
$user = factory(User::class)->create();
|
||||
|
||||
$response = $this->actingAs($user)->get('/backstage/concerts/new');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
function guests_cannot_view_the_add_concert_form()
|
||||
{
|
||||
$response = $this->get('/backstage/concerts/new');
|
||||
|
||||
$response->assertStatus(302);
|
||||
$response->assertRedirect('/login');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user