Merge pull request #3011 from AreYouRlyScared/addcronmonth
Adds months for schedules
This commit is contained in:
commit
aab353d91e
12 changed files with 72 additions and 18 deletions
|
@ -25,6 +25,7 @@ class CreateServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
'minute' => '0',
|
||||
'hour' => '*/2',
|
||||
'day_of_week' => '2',
|
||||
'month' => '1',
|
||||
'day_of_month' => '*',
|
||||
]);
|
||||
|
||||
|
@ -39,6 +40,7 @@ class CreateServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
$this->assertSame('0', $schedule->cron_minute);
|
||||
$this->assertSame('*/2', $schedule->cron_hour);
|
||||
$this->assertSame('2', $schedule->cron_day_of_week);
|
||||
$this->assertSame('1', $schedule->cron_month);
|
||||
$this->assertSame('*', $schedule->cron_day_of_month);
|
||||
$this->assertSame('Test Schedule', $schedule->name);
|
||||
|
||||
|
@ -69,6 +71,7 @@ class CreateServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
'minute' => '*',
|
||||
'hour' => '*',
|
||||
'day_of_month' => '*',
|
||||
'month' => '*',
|
||||
'day_of_week' => '*',
|
||||
])
|
||||
->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)
|
||||
|
|
|
@ -19,6 +19,7 @@ class UpdateServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
'minute' => '5',
|
||||
'hour' => '*',
|
||||
'day_of_week' => '*',
|
||||
'month' => '*',
|
||||
'day_of_month' => '*',
|
||||
'is_active' => false,
|
||||
];
|
||||
|
@ -35,7 +36,7 @@ class UpdateServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
|
||||
/** @var \Pterodactyl\Models\Schedule $schedule */
|
||||
$schedule = factory(Schedule::class)->create(['server_id' => $server->id]);
|
||||
$expected = Utilities::getScheduleNextRunDate('5', '*', '*', '*');
|
||||
$expected = Utilities::getScheduleNextRunDate('5', '*', '*', '*', '*');
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->postJson("/api/client/servers/{$server->uuid}/schedules/{$schedule->id}", $this->updateData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue