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:
parent
060404cd6c
commit
fadfdca2af
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
@ -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']);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user