Level 4
Found out it was totally my fault. Some dd() left in the code.
Hello,
I'm trying to run a very basic test where a contributor can edit an article. The problem is that the press() method generates a dd() of the request. This problem only occurs in my ArticlesControllerTest.php.
/** @test */
public function it_allows_contributors_to_edit_articles()
{
$contributor = $this->createContributor();
$article = $this->createArticle();
$this->actingAs($contributor)
->visitRoute('articles.edit', $article->slug)
->type('Lorem ipsum dolor sit amet', 'title')
->press(trans('text.edit-article'))
->see(trans('text.resource-edited'));
}
Edit: After further investigation, this part in ArticlesController.php is dd(), even in the browser.
if (!$updated) {
return back()->withErrors(trans('text.resource-not-updated'));
}
Found out it was totally my fault. Some dd() left in the code.
Please or to participate in this conversation.