mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-05 15:49:17 +00:00
148 - Viewing an Unused Invitation
This commit is contained in:
29
tests/Feature/AcceptInvitationTest.php
Normal file
29
tests/Feature/AcceptInvitationTest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user