mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-31 03:46:38 +00:00
49 - Moving the Email to the Reservation
This commit is contained in:
@@ -18,7 +18,7 @@ class ReservationTest extends TestCase
|
||||
(object) ['price' => 1200],
|
||||
]);
|
||||
|
||||
$reservation = new Reservation($tickets);
|
||||
$reservation = new Reservation($tickets, 'john@example.com');
|
||||
|
||||
$this->assertEquals(3600, $reservation->totalCost());
|
||||
}
|
||||
@@ -32,11 +32,19 @@ class ReservationTest extends TestCase
|
||||
(object) ['price' => 1200],
|
||||
]);
|
||||
|
||||
$reservation = new Reservation($tickets);
|
||||
$reservation = new Reservation($tickets, 'john@example.com');
|
||||
|
||||
$this->assertEquals($tickets, $reservation->tickets());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
function retrieving_the_customers_email()
|
||||
{
|
||||
$reservation = new Reservation(collect(), 'john@example.com');
|
||||
|
||||
$this->assertEquals('john@example.com', $reservation->email());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
function reserved_tickets_are_released_when_a_reservation_is_cancelled()
|
||||
{
|
||||
@@ -46,7 +54,7 @@ class ReservationTest extends TestCase
|
||||
Mockery::spy(Ticket::class),
|
||||
]);
|
||||
|
||||
$reservation = new Reservation($tickets);
|
||||
$reservation = new Reservation($tickets, 'john@example.com');
|
||||
|
||||
$reservation->cancel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user