4.1 - Asserting Against JSON Responses

This commit is contained in:
Adam Wathan
2016-11-16 16:37:49 -05:00
parent 8abc8b19c9
commit 709e87bf69

View File

@@ -41,6 +41,13 @@ class PurchaseTicketsTest extends TestCase
]);
$this->assertResponseStatus(201);
$this->seeJsonSubset([
'email' => 'john@example.com',
'ticket_quantity' => 3,
'amount' => 9750,
]);
$this->assertEquals(9750, $this->paymentGateway->totalCharges());
$this->assertTrue($concert->hasOrderFor('john@example.com'));
$this->assertEquals(3, $concert->ordersFor('john@example.com')->first()->ticketQuantity());