mirror of
https://github.com/snipe/snipe-it.git
synced 2025-10-29 11:21:21 +00:00
Merge pull request #17454 from uberbrady/de_flake_action_log_tests
Enforce order by ID for actionlog tests
This commit is contained in:
commit
83a19fbbbf
@ -11,7 +11,8 @@ trait AssertHasActionLogs
|
||||
{
|
||||
public function assertHasTheseActionLogs(Model $item, array $statuses)
|
||||
{
|
||||
Assert::assertEquals($statuses, $item->assetlog()->orderBy('id')->pluck('action_type')->toArray(), "Failed asserting that action logs match");
|
||||
//note we have to do a 'reorder()' here because there is an implicit "order_by created_at" baked in to the relationship
|
||||
Assert::assertEquals($statuses, $item->assetlog()->reorder('id')->pluck('action_type')->toArray(), "Failed asserting that action logs match");
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user