Skip to content

Commit

Permalink
style: pint
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTWF committed Aug 19, 2023
1 parent f29f1d3 commit 6982c97
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions tests/Api/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,44 +40,44 @@ public function testItReturnsEmptyPluginApiData()
);
}

public function testItReturnsCachedData()
{
// Put some fake data in cache
Cache::remember(
'plugin_api_response',
Carbon::now()->addMinutes(1),
fn () => [
public function testItReturnsCachedData()
{
// Put some fake data in cache
Cache::remember(
'plugin_api_response',
Carbon::now()->addMinutes(1),
fn () => [
'events' => [],
'flight_information_regions' => [],
'flow_measures' => [],
]
);

FlightInformationRegion::factory()->count(5)->create();
Event::factory()->count(3)->create();

// Should show, if the data weren't cached
$active = FlowMeasure::factory()
->create();

$notStarted = FlowMeasure::factory()
->notStarted()
->create();

$finished = FlowMeasure::factory()
->finished()
->create();

$this->get('api/v1/plugin')
->assertStatus(200)
->assertExactJson(
[
'events' => [],
'flight_information_regions' => [],
'flow_measures' => [],
]
);

FlightInformationRegion::factory()->count(5)->create();
Event::factory()->count(3)->create();

// Should show, if the data weren't cached
$active = FlowMeasure::factory()
->create();

$notStarted = FlowMeasure::factory()
->notStarted()
->create();

$finished = FlowMeasure::factory()
->finished()
->create();

$this->get('api/v1/plugin')
->assertStatus(200)
->assertExactJson(
[
'events' => [],
'flight_information_regions' => [],
'flow_measures' => [],
]
);
}
}

public function testItReturnsPluginApiData()
{
Expand Down

0 comments on commit 6982c97

Please sign in to comment.