1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

fxies for tests

This commit is contained in:
David Bomba 2021-04-19 19:59:11 +10:00
parent 060404cd6c
commit fadfdca2af
3 changed files with 6 additions and 6 deletions

View File

@ -399,10 +399,10 @@ class TaskStatusController extends BaseController
*/
public function destroy(DestroyTaskStatusRequest $request, TaskStatus $task_status)
{
$this->task_status_repo->delete($task_status);
$task_status = $this->task_status_repo->delete($task_status);
return $this->itemResponse($task_status->fresh());
return $this->itemResponse($task_status);
}
/**

View File

@ -22,10 +22,10 @@ class TaskStatusRepository extends BaseRepository
public function delete($task_status)
{
$task_status = TaskStatus::where('company_id', $task_status->company_id)
$ts = TaskStatus::where('company_id', $task_status->company_id)
->first();
$new_status = $task_status ? $task_status->id : null;
$new_status = $ts ? $ts->id : null;
Task::where('status_id', $task_status->id)
->where('company_id', $task_status->company_id)

View File

@ -135,7 +135,7 @@ class TaskStatusApiTest extends TestCase
])->delete('/api/v1/task_statuses/'.$this->encodePrimaryKey($this->task_status->id));
$arr = $response->json();
nlog($arr);
$this->assertTrue($arr['data']['is_deleted']);
}