Skip to content

Commit 4d69cdd

Browse files
committed
Add test to show the optimization still works
1 parent 1298c52 commit 4d69cdd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Integration/QueryDataTableTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,19 @@ public function it_can_set_total_filtered_records()
5555
#[Test]
5656
public function it_returns_all_records_when_no_parameters_is_passed()
5757
{
58+
DB::enableQueryLog();
59+
5860
$crawler = $this->call('GET', '/query/users');
5961
$crawler->assertJson([
6062
'draw' => 0,
6163
'recordsTotal' => 20,
6264
'recordsFiltered' => 20,
6365
]);
66+
67+
DB::disableQueryLog();
68+
$queryLog = DB::getQueryLog();
69+
70+
$this->assertCount(2, $queryLog);
6471
}
6572

6673
#[Test]

0 commit comments

Comments
 (0)