Skip to content

Commit

Permalink
Add test to show the optimization still works
Browse files Browse the repository at this point in the history
  • Loading branch information
JurianArie committed Jul 11, 2024
1 parent 1298c52 commit 4d69cdd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Integration/QueryDataTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,19 @@ public function it_can_set_total_filtered_records()
#[Test]
public function it_returns_all_records_when_no_parameters_is_passed()
{
DB::enableQueryLog();

$crawler = $this->call('GET', '/query/users');
$crawler->assertJson([
'draw' => 0,
'recordsTotal' => 20,
'recordsFiltered' => 20,
]);

DB::disableQueryLog();
$queryLog = DB::getQueryLog();

$this->assertCount(2, $queryLog);
}

#[Test]
Expand Down

0 comments on commit 4d69cdd

Please sign in to comment.