In my business logic I don't care about the order of elements.
Here is my example of a test
$this->getJson('/api/order-attempts')
->assertJson([
'data' => [
['status' => 'error'],
['status' => 'error'],
['status' => 'confirmed'],
['status' => 'confirmed'],
['status' => 'confirmed'],
],
])->isOk();
It's fails from time to time only because of the order. I do NOT want to put sorting to the api, cause I don't need it.
Is it possible to assertJsonIgnoringOrder() somehow?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2q1VSTw
via IFTTT
Aucun commentaire:
Enregistrer un commentaire