Skip to content

A free open source IT asset/license management system

Tests: Added explicit sort on tests to fix flakiness

snipee430e4e6e27b
diff --git a/tests/Feature/AssetModels/Api/AssetModelFilesTest.php b/tests/Feature/AssetModels/Api/AssetModelFilesTest.php
index e0262658b5..64271c6e15 100644
--- a/tests/Feature/AssetModels/Api/AssetModelFilesTest.php
+++ b/tests/Feature/AssetModels/Api/AssetModelFilesTest.php
@@ -135,7 +135,7 @@ class AssetModelFilesTest extends TestCase
// List the files to get the file ID
$result = $this->actingAsForApi($user)
->getJson(
- route('api.files.index', ['object_type' => 'models', 'id' => $model->id, 'order' => 'asc'])
+ route('api.files.index', ['object_type' => 'models', 'id' => $model->id, 'sort' => 'id', 'order' => 'asc'])
)
->assertOk()
->assertJsonStructure(