Improve exception handling and model binding
This commit is contained in:
parent
e9ca934cb4
commit
0fca80e7e4
22 changed files with 148 additions and 82 deletions
|
@ -30,4 +30,18 @@ class ArticlesTest extends TestCase
|
|||
$response = $this->get('/blog/s/2');
|
||||
$response->assertRedirect('/blog/' . date('Y') . '/' . date('m') . '/some-code-i-did');
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function unknownSlugGives404()
|
||||
{
|
||||
$response = $this->get('/blog/' . date('Y') . '/' . date('m') . '/unknown-slug');
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function unknownArticleIdGives404()
|
||||
{
|
||||
$response = $this->get('/blog/s/22');
|
||||
$response->assertNotFound();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue