mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-31 11:46:45 +00:00
68 - Removing the Browser Kit Dependency
This commit is contained in:
@@ -7,7 +7,7 @@ use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class PurchaseTicketsTest extends BrowserKitTestCase
|
||||
class PurchaseTicketsTest extends TestCase
|
||||
{
|
||||
use DatabaseMigrations;
|
||||
|
||||
@@ -21,10 +21,25 @@ class PurchaseTicketsTest extends BrowserKitTestCase
|
||||
private function orderTickets($concert, $params)
|
||||
{
|
||||
$savedRequest = $this->app['request'];
|
||||
$this->json('POST', "/concerts/{$concert->id}/orders", $params);
|
||||
$this->response = $this->json('POST', "/concerts/{$concert->id}/orders", $params);
|
||||
$this->app['request'] = $savedRequest;
|
||||
}
|
||||
|
||||
private function assertResponseStatus($status)
|
||||
{
|
||||
$this->response->assertStatus($status);
|
||||
}
|
||||
|
||||
private function seeJsonSubset($data)
|
||||
{
|
||||
$this->response->assertJson($data);
|
||||
}
|
||||
|
||||
private function decodeResponseJson()
|
||||
{
|
||||
return $this->response->decodeResponseJson();
|
||||
}
|
||||
|
||||
private function assertValidationError($field)
|
||||
{
|
||||
$this->assertResponseStatus(422);
|
||||
|
||||
Reference in New Issue
Block a user