Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aozisik committed Sep 4, 2023
1 parent 31fe37f commit cf8cd9c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/Feature/RunCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ public function it_returns_a_table_output()
*/
public function it_runs_only_due_checks()
{
Appkeep::forgetDefaultChecks()->checks([
TestCheck::make('test-check')->result(
Result::ok()->summary('50%')
),
TestCheck::make('test-check-2')->result(
Result::ok()->summary('50%')
)->everyFifteenMinutes(),
]);

Http::fake();

Carbon::setTestNow(Carbon::now()->setMinute(3)->setSecond(0));
Expand All @@ -67,7 +76,7 @@ public function it_runs_only_due_checks()
$data = $request->data();

return count($data['checks']) === 1
&& $data['checks'][0]['check'] === 'test-check-1';
&& $data['checks'][0]['check'] === 'test-check';
});

Carbon::setTestNow(Carbon::now()->setMinute(15)->setSecond(0));
Expand Down

0 comments on commit cf8cd9c

Please sign in to comment.