jonnybarnes.uk/tests/Feature/PlacesTest.php
2017-02-18 14:31:49 +00:00

34 lines
794 B
PHP

<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class PlacesTest extends TestCase
{
/**
* Test the `/places` page for OK response.
*
* @return void
*/
public function test_places_page()
{
$response = $this->get('/places');
$response->assertStatus(200);
}
/**
* Test a specific place.
*
* @return void
*/
public function test_single_place()
{
$place = \App\Place::where('slug', 'the-bridgewater-pub')->first();
$response = $this->get('/places/the-bridgewater-pub');
$response->assertViewHas('place', $place);
}
}