Skip to content

Commit

Permalink
Sort autocomplete results as order is not garanteed
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Jan 8, 2025
1 parent 6b05310 commit df688b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/AtlasSearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,13 @@ public function testDatabaseBuilderAutocomplete()

self::assertInstanceOf(LaravelCollection::class, $results);
self::assertCount(3, $results);
// Sort results, because order is not guaranteed
$results = $results->all();
sort($results);
self::assertSame([
'Operating System Concepts',
'Database System Concepts',
'Modern Operating Systems',
], $results->all());
'Operating System Concepts',
], $results);
}
}

0 comments on commit df688b1

Please sign in to comment.