public function test_store_by_post() { $lesson = ['name' => 'Lesson x']; $this->post('api/v1/lesson/', $lesson); $this->seeStatusCode(200); $this->seeJson(['name' => 'Lesson x']); $this->assertInstanceOf(Lesson::class, $this->response->original); $this->seeInDatabase('lessons', ['id' => $this->response->original->id]); }