seed(); $this->seed(SettingsSeeder::class); $user = User::find(1); $this->withHeaders([ 'company' => $user->company_id, ]); Passport::actingAs( $user, ['*'] ); } /** @test */ public function testDashboard() { $response = $this->json('GET', 'api/dashboard'); $response->assertOk(); } /** @test */ public function testPieChartData() { $response = $this->json('GET', 'api/dashboard/expense/chart'); $response->assertOk(); } }