68 - Removing the Browser Kit Dependency

This commit is contained in:
Adam Wathan
2017-02-02 16:48:42 -05:00
parent 4f91fbef08
commit 09e1d5a11d
5 changed files with 90 additions and 161 deletions

View File

@@ -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);
}
}