Files
ticketbeast/tests/features/ViewOrderTest.php
2017-02-10 12:48:19 -05:00

30 lines
761 B
PHP

<?php
use App\Order;
use App\Ticket;
use App\Concert;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ViewOrderTest extends TestCase
{
use DatabaseMigrations;
/** @test */
function user_can_view_their_order_confirmation()
{
$concert = factory(Concert::class)->create();
$order = factory(Order::class)->create();
$ticket = factory(Ticket::class)->create([
'concert_id' => $concert->id,
'order_id' => $order->id,
]);
// Visit the order confirmation page
$this->get("/orders/{$order->id}");
// Assert we see the correct order details
}
}