mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
68 - Removing the Browser Kit Dependency
This commit is contained in:
@@ -6,7 +6,7 @@ use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ViewConcertListingTest extends BrowserKitTestCase
|
||||
class ViewConcertListingTest extends TestCase
|
||||
{
|
||||
use DatabaseMigrations;
|
||||
|
||||
@@ -26,17 +26,18 @@ class ViewConcertListingTest extends BrowserKitTestCase
|
||||
'additional_information' => 'For tickets, call (555) 555-5555.',
|
||||
]);
|
||||
|
||||
$this->visit('/concerts/'.$concert->id);
|
||||
$response = $this->get('/concerts/'.$concert->id);
|
||||
|
||||
$this->see('The Red Chord');
|
||||
$this->see('with Animosity and Lethargy');
|
||||
$this->see('December 13, 2016');
|
||||
$this->see('8:00pm');
|
||||
$this->see('32.50');
|
||||
$this->see('The Mosh Pit');
|
||||
$this->see('123 Example Lane');
|
||||
$this->see('Laraville, ON 17916');
|
||||
$this->see('For tickets, call (555) 555-5555.');
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('The Red Chord');
|
||||
$response->assertSee('with Animosity and Lethargy');
|
||||
$response->assertSee('December 13, 2016');
|
||||
$response->assertSee('8:00pm');
|
||||
$response->assertSee('32.50');
|
||||
$response->assertSee('The Mosh Pit');
|
||||
$response->assertSee('123 Example Lane');
|
||||
$response->assertSee('Laraville, ON 17916');
|
||||
$response->assertSee('For tickets, call (555) 555-5555.');
|
||||
}
|
||||
|
||||
/** @test */
|
||||
@@ -44,8 +45,8 @@ class ViewConcertListingTest extends BrowserKitTestCase
|
||||
{
|
||||
$concert = factory(Concert::class)->states('unpublished')->create();
|
||||
|
||||
$this->get('/concerts/'.$concert->id);
|
||||
$response = $this->get('/concerts/'.$concert->id);
|
||||
|
||||
$this->assertResponseStatus(404);
|
||||
$response->assertStatus(404);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user