I have written EditTaskControllerTest
class and implemented the tests. These are working locally but not on CI it is failing only for one case test_should_accept_valid_payload
.
Although I did run multiple runs, and got failed for this particular line
$response->assertRedirectToRoute('task.show', [
'group' => $this->group,
'task' => $this->task,
]);
In the controller definition, it clearly redirects the user to the task.show
return to_route('task.show', [
'group' => $group,
'task' => $task,
]);
I am not keeping you in suspense, the repository can be found here and the failing test case is here.
As you can see on of the test on ubuntu is working fine and another is failing on the same machine.
Now when I clear the database and run the tests again on my system, it is working for me.
Update
I was using pgsql in the localhost, and sqlite on the CI. When I switched to the sqlite on localhost, it works randomly. Please help me with the fix.