public function test_store_by_post() { $schedule = ['name' => 'Schedule x', 'start' => '13:00', 'end' => '17:00']; $this->post('api/v1/schedule/', $schedule); $this->seeStatusCode(200); $this->seeJson(['name' => 'Schedule x']); $this->assertInstanceOf(Schedule::class, $this->response->original); $this->seeInDatabase('schedules', ['id' => $this->response->original->id]); }