-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Tests\Feature\UpdatePostTest::guests_cannot_update_posts
Expected status code 403 but received 302.
Failed asserting that false is true.
/var/www/html/ValetProjects/styde-gates-mine/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:133
/var/www/html/ValetProjects/styde-gates-mine/tests/Feature/UpdatePostTest.php:73
Versión de laravel: 5.7.*
Código de la prueba guests_cannot_update_posts:
/** @test */
function guests_cannot_update_posts()
{
$this->withoutExceptionHandling();
$post = factory(Post::class)->create();
$response = $this->put("admin/posts/{$post->id}", [
'title' => 'Updated post title',
]);
$response->assertRedirect('login');
$this->assertDatabaseMissing('posts', [
'id' => $post->id,
'title' => 'Updated post title',
]);
}
Metadata
Metadata
Assignees
Labels
No labels