6.8 - Reserving Individual Tickets

This commit is contained in:
Adam Wathan
2016-11-20 18:50:04 -05:00
parent 2b21f07aa2
commit c3c80722f5
6 changed files with 45 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
<?php
use App\Ticket;
use App\Concert;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
@@ -9,6 +10,17 @@ class TicketTest extends TestCase
{
use DatabaseMigrations;
/** @test */
function a_ticket_can_be_reserved()
{
$ticket = factory(Ticket::class)->create();
$this->assertNull($ticket->reserved_at);
$ticket->reserve();
$this->assertNotNull($ticket->fresh()->reserved_at);
}
/** @test */
function a_ticket_can_be_released()
{