mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-19 13:54:49 +00:00
75 - Decoupling Data from Presentation
This commit is contained in:
@@ -40,7 +40,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="media-body p-xs-l-4">
|
<div class="media-body p-xs-l-4">
|
||||||
<p class="wt-bold">
|
<p class="wt-bold">
|
||||||
{{ $ticket->concert->date->format('l, F j, Y') }}
|
<time datetime="{{ $ticket->concert->date->format('Y-m-d H:i') }}">
|
||||||
|
{{ $ticket->concert->date->format('l, F jS, Y') }}
|
||||||
|
</time>
|
||||||
</p>
|
</p>
|
||||||
<p class="text-dark-soft">
|
<p class="text-dark-soft">
|
||||||
Doors at {{ $ticket->concert->date->format('g:ia') }}
|
Doors at {{ $ticket->concert->date->format('g:ia') }}
|
||||||
|
|||||||
@@ -45,12 +45,10 @@ class ViewOrderTest extends TestCase
|
|||||||
'code' => 'TICKETCODE456'
|
'code' => 'TICKETCODE456'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Visit the order confirmation page
|
|
||||||
$response = $this->get("/orders/ORDERCONFIRMATION1234");
|
$response = $this->get("/orders/ORDERCONFIRMATION1234");
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
|
|
||||||
// Assert we see the correct order details
|
|
||||||
$response->assertViewHas('order', function ($viewOrder) use ($order) {
|
$response->assertViewHas('order', function ($viewOrder) use ($order) {
|
||||||
return $order->id === $viewOrder->id;
|
return $order->id === $viewOrder->id;
|
||||||
});
|
});
|
||||||
@@ -67,8 +65,6 @@ class ViewOrderTest extends TestCase
|
|||||||
$response->assertSee('Laraville, ON');
|
$response->assertSee('Laraville, ON');
|
||||||
$response->assertSee('17916');
|
$response->assertSee('17916');
|
||||||
$response->assertSee('john@example.com');
|
$response->assertSee('john@example.com');
|
||||||
|
$response->assertSee('2017-03-12 20:00');
|
||||||
$response->assertSee('Sunday, March 12, 2017');
|
|
||||||
$response->assertSee('Doors at 8:00pm');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user