mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 05:43:45 +02:00
Fix integration tests to properly account for the rule position in the API
This commit is contained in:
@@ -66,7 +66,7 @@ class CreateServerScheduleTaskTest extends ClientApiIntegrationTestCase
|
||||
'time_offset' => 0,
|
||||
])
|
||||
->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)
|
||||
->assertJsonPath('errors.0.code', 'in')
|
||||
->assertJsonPath('errors.0.meta.rule', 'in')
|
||||
->assertJsonPath('errors.0.source.field', 'action');
|
||||
|
||||
$this->actingAs($user)->postJson($this->link($schedule, '/tasks'), [
|
||||
@@ -74,7 +74,7 @@ class CreateServerScheduleTaskTest extends ClientApiIntegrationTestCase
|
||||
'time_offset' => 0,
|
||||
])
|
||||
->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)
|
||||
->assertJsonPath('errors.0.code', 'required_unless')
|
||||
->assertJsonPath('errors.0.meta.rule', 'required_unless')
|
||||
->assertJsonPath('errors.0.source.field', 'payload');
|
||||
|
||||
$this->actingAs($user)->postJson($this->link($schedule, '/tasks'), [
|
||||
@@ -84,7 +84,7 @@ class CreateServerScheduleTaskTest extends ClientApiIntegrationTestCase
|
||||
'sequence_id' => 'hodor',
|
||||
])
|
||||
->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)
|
||||
->assertJsonPath('errors.0.code', 'numeric')
|
||||
->assertJsonPath('errors.0.meta.rule', 'numeric')
|
||||
->assertJsonPath('errors.0.source.field', 'sequence_id');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user