Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy132 committed Dec 3, 2023
1 parent c284ff1 commit d4fa2b9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function testScheduleValidationRules()
$response = $this->actingAs($user)->postJson("/api/client/servers/$server->uuid/schedules", []);

$response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);
foreach (['name', 'minute', 'hour', 'day_of_month', 'day_of_week'] as $i => $field) {
foreach (['name', 'only_when_online', 'minute', 'hour', 'day_of_month', 'month', 'day_of_week'] as $i => $field) {
$response->assertJsonPath("errors.$i.code", 'ValidationException');
$response->assertJsonPath("errors.$i.meta.rule", 'required');
$response->assertJsonPath("errors.$i.meta.source_field", $field);
Expand All @@ -67,6 +67,7 @@ public function testScheduleValidationRules()
->postJson("/api/client/servers/$server->uuid/schedules", [
'name' => 'Testing',
'is_active' => 'no',
'only_when_online' => 'false',
'minute' => '*',
'hour' => '*',
'day_of_month' => '*',
Expand Down

0 comments on commit d4fa2b9

Please sign in to comment.