34 lines
794 B
PHP
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);
|
|
}
|
|
}
|