mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
4.1 - Asserting Against JSON Responses
This commit is contained in:
@@ -41,6 +41,13 @@ class PurchaseTicketsTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertResponseStatus(201);
|
$this->assertResponseStatus(201);
|
||||||
|
|
||||||
|
$this->seeJsonSubset([
|
||||||
|
'email' => 'john@example.com',
|
||||||
|
'ticket_quantity' => 3,
|
||||||
|
'amount' => 9750,
|
||||||
|
]);
|
||||||
|
|
||||||
$this->assertEquals(9750, $this->paymentGateway->totalCharges());
|
$this->assertEquals(9750, $this->paymentGateway->totalCharges());
|
||||||
$this->assertTrue($concert->hasOrderFor('john@example.com'));
|
$this->assertTrue($concert->hasOrderFor('john@example.com'));
|
||||||
$this->assertEquals(3, $concert->ordersFor('john@example.com')->first()->ticketQuantity());
|
$this->assertEquals(3, $concert->ordersFor('john@example.com')->first()->ticketQuantity());
|
||||||
|
|||||||
Reference in New Issue
Block a user