Hola, alguien tuvo este mismo error a la hora de ejecutar el test:
Tests\Feature\ArticleTest::it_shows_a_collection_of_articles
Unable to find JSON:
Yo creé la prueba tal cual se hizo en este video:
/** test */
Tests\Feature\ArticleTest::it_shows_a_collection_of_articles
Unable to find JSON:
Yo creé la prueba tal cual se hizo en este video:
/** test */
public function it_shows_a_collection_of_articles(){
$this->json('GET',"/api/articles?api_token={$this->user->api_token}")
->assertStatus(200)
->assertJson([
'data' => [
[
'id' => $this->article->id,
'atributes' => [
'title' => $this->article->title,
'description' => $this->article->content,
'picture' => $this->article->thumbnail,
'created_at' => $this->article->created_at->diffForHumans()
]
]
]
]);
}