Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (24 sloc) 714 Bytes
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ReadArticlesTest extends TestCase
{
use DatabaseMigrations;
/** @test */
function a_user_can_view_all_articles()
{
$article = factory('App\Article')->create();
$this->get('/articles')
->assertSee($article->title);
}
/** @test */
function a_user_can_view_a_single_article()
{
$article = factory('App\Article')->create();
$this->get("/articles/{$article->slug}")
->assertSee($article->title);
}
}