mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 03:04:05 +00:00
30 lines
699 B
PHP
30 lines
699 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
use App\Invitation;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
class AcceptInvitationTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
/** @test */
|
|
function viewing_an_unused_invitation()
|
|
{
|
|
$this->withoutExceptionHandling();
|
|
|
|
$invitation = factory(Invitation::class)->create([
|
|
'code' => 'TESTCODE1234',
|
|
]);
|
|
|
|
$response = $this->get('/invitations/TESTCODE1234');
|
|
|
|
$response->assertStatus(200);
|
|
$response->assertViewIs('invitations.show');
|
|
$this->assertTrue($response->data('invitation')->is($invitation));
|
|
}
|
|
}
|