From e137b1ac0b53b44c316a3d4d5846fd639992116e Mon Sep 17 00:00:00 2001 From: Nikola Cirkovic Date: Thu, 26 May 2022 04:30:07 +0200 Subject: [PATCH] INA-5 | Update Tests --- tests/Feature/Scheduler/SchedulerTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Scheduler/SchedulerTest.php b/tests/Feature/Scheduler/SchedulerTest.php index 1786e001d1..d9a616e564 100644 --- a/tests/Feature/Scheduler/SchedulerTest.php +++ b/tests/Feature/Scheduler/SchedulerTest.php @@ -75,7 +75,7 @@ class SchedulerTest extends TestCase ])->put('/api/v1/task_scheduler/' . $this->encodePrimaryKey($scheduler->id), $updateData); $responseData = $response->json(); - $this->assertEquals(['successfully_updated_scheduler'], $responseData); + $this->assertEquals($updateData['start_from'], $responseData['data']['start_from']); } public function testSchedulerCanBeSeen() @@ -129,7 +129,8 @@ class SchedulerTest extends TestCase ])->put('/api/v1/task_scheduler/' . $this->encodePrimaryKey($scheduler->id) . '/update_job', $updateData); $updatedSchedulerJob = Scheduler::first()->job->action_name; - $this->assertSame('create_credit_report', $updatedSchedulerJob); + $arr = $response->json(); + $this->assertSame('create_credit_report', $arr['data']['job']['action_name']); } public function testSchedulerCanBeCreated()