withHeaders([ 'Api-Token' => 'test-token', 'Accept' => 'application/json', ])->getJson('/api/v1/order-time'); // Assert $response->assertOk(); // Structure depends on OrderRepository::availableTimes() implementation // Assuming it returns an array of times or dates $this->assertIsArray($response->json('data')); }); test('can list order payment types', function () { // Arrange PaymentType::create(['name' => 'Cash']); PaymentType::create(['name' => 'Card']); // Act $response = $this->withHeaders([ 'Api-Token' => 'test-token', 'Accept' => 'application/json', ])->getJson('/api/v1/order-payments'); // Assert $response->assertOk() ->assertJsonStructure([ 'data' => [ '*' => [ 'id', 'name', ] ] ]); $this->assertCount(2, $response->json('data')); });