Skip to content

Commit 90ba76c

Browse files
committed
Return integration tests to passing state
1 parent 1e19e02 commit 90ba76c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

tests/Integration/Api/Client/Server/Schedule/CreateServerScheduleTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ public function testScheduleValidationRules()
5757

5858
$response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);
5959
foreach (['name', 'minute', 'hour', 'day_of_month', 'day_of_week'] as $i => $field) {
60-
$response->assertJsonPath("errors.{$i}.code", 'required');
61-
$response->assertJsonPath("errors.{$i}.source.field", $field);
60+
$response->assertJsonPath("errors.{$i}.code", 'ValidationException');
61+
$response->assertJsonPath("errors.{$i}.meta.rule", 'required');
62+
$response->assertJsonPath("errors.{$i}.meta.source_field", $field);
6263
}
6364

6465
$this->actingAs($user)

tests/Integration/Api/Client/Server/ScheduleTask/CreateServerScheduleTaskTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public function testValidationErrorsAreReturned()
5656
$response = $this->actingAs($user)->postJson($this->link($schedule, '/tasks'))->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);
5757

5858
foreach (['action', 'payload', 'time_offset'] as $i => $field) {
59-
$response->assertJsonPath("errors.{$i}.code", $field === 'payload' ? 'required_unless' : 'required');
60-
$response->assertJsonPath("errors.{$i}.source.field", $field);
59+
$response->assertJsonPath("errors.{$i}.meta.rule", $field === 'payload' ? 'required_unless' : 'required');
60+
$response->assertJsonPath("errors.{$i}.meta.source_field", $field);
6161
}
6262

6363
$this->actingAs($user)->postJson($this->link($schedule, '/tasks'), [
@@ -67,15 +67,15 @@ public function testValidationErrorsAreReturned()
6767
])
6868
->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)
6969
->assertJsonPath('errors.0.meta.rule', 'in')
70-
->assertJsonPath('errors.0.source.field', 'action');
70+
->assertJsonPath('errors.0.meta.source_field', 'action');
7171

7272
$this->actingAs($user)->postJson($this->link($schedule, '/tasks'), [
7373
'action' => 'command',
7474
'time_offset' => 0,
7575
])
7676
->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)
7777
->assertJsonPath('errors.0.meta.rule', 'required_unless')
78-
->assertJsonPath('errors.0.source.field', 'payload');
78+
->assertJsonPath('errors.0.meta.source_field', 'payload');
7979

8080
$this->actingAs($user)->postJson($this->link($schedule, '/tasks'), [
8181
'action' => 'command',
@@ -85,7 +85,7 @@ public function testValidationErrorsAreReturned()
8585
])
8686
->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)
8787
->assertJsonPath('errors.0.meta.rule', 'numeric')
88-
->assertJsonPath('errors.0.source.field', 'sequence_id');
88+
->assertJsonPath('errors.0.meta.source_field', 'sequence_id');
8989
}
9090

9191
/**

0 commit comments

Comments
 (0)