Skip to content

Commit

Permalink
add sorting to log tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Jun 27, 2018
1 parent ef1b752 commit e250de5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/API/Management/LogsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public static function setUpBeforeClass()
*/
public function testLogSearch()
{
$search_results = self::$api->search();
$search_results = self::$api->search([
// Ensure that we have the right log order to check position in self::testLogSearchPagination().
'sort' => 'date:-1',
]);
$this->assertNotEmpty($search_results);

// Get the 10th log entry to test pagination in self::testLogSearchPagination().
Expand Down Expand Up @@ -82,6 +85,8 @@ public function testLogSearchPagination()
{
$expected_count = 10;
$search_results = self::$api->search([
'sort' => 'date:-1',

// Fields here to speed up API call.
'fields' => '_id,log_id,date',
'include_fields' => true,
Expand Down

0 comments on commit e250de5

Please sign in to comment.