mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-30 16:46:31 +00:00
70 - Driving out the Endpoint
This commit is contained in:
@@ -14,16 +14,21 @@ class ViewOrderTest extends TestCase
|
||||
/** @test */
|
||||
function user_can_view_their_order_confirmation()
|
||||
{
|
||||
$this->disableExceptionHandling();
|
||||
|
||||
$concert = factory(Concert::class)->create();
|
||||
$order = factory(Order::class)->create();
|
||||
$order = factory(Order::class)->create([
|
||||
'confirmation_number' => 'ORDERCONFIRMATION1234'
|
||||
]);
|
||||
$ticket = factory(Ticket::class)->create([
|
||||
'concert_id' => $concert->id,
|
||||
'order_id' => $order->id,
|
||||
]);
|
||||
|
||||
// Visit the order confirmation page
|
||||
$this->get("/orders/{$order->id}");
|
||||
$response = $this->get("/orders/ORDERCONFIRMATION1234");
|
||||
|
||||
$response->assertStatus(200);
|
||||
// Assert we see the correct order details
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user