mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-30 19:46:34 +00:00
51 - Green with Feature Envy
This commit is contained in:
@@ -26,20 +26,6 @@ class OrderTest extends TestCase
|
||||
$this->assertEquals(2, $concert->ticketsRemaining());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
function creating_an_order_from_a_reservation()
|
||||
{
|
||||
$concert = factory(Concert::class)->create(['ticket_price' => 1200]);
|
||||
$tickets = factory(Ticket::class, 3)->create(['concert_id' => $concert->id]);
|
||||
$reservation = new Reservation($tickets, 'john@example.com');
|
||||
|
||||
$order = Order::fromReservation($reservation);
|
||||
|
||||
$this->assertEquals('john@example.com', $order->email);
|
||||
$this->assertEquals(3, $order->ticketQuantity());
|
||||
$this->assertEquals(3600, $order->amount);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
function converting_to_an_array()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user