From d0648825b66e5637854a6d848374cfc6523759be Mon Sep 17 00:00:00 2001 From: Alex Vanderbist Date: Mon, 23 Dec 2024 22:59:30 +0100 Subject: [PATCH] Tweak tests --- tests/FilterTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/FilterTest.php b/tests/FilterTest.php index 371a1f2c..75d5042a 100644 --- a/tests/FilterTest.php +++ b/tests/FilterTest.php @@ -681,6 +681,8 @@ public function __invoke(Builder $query, $value, string $property): Builder }); it('should apply a nullable filter when filter exists and is null', function () { + DB::enableQueryLog(); + TestModel::create(['name' => null]); TestModel::create(['name' => 'UniqueJohn Deer']); @@ -690,6 +692,7 @@ public function __invoke(Builder $query, $value, string $property): Builder ->allowedFilters(AllowedFilter::exact('name')->nullable()) ->get(); + $this->assertQueryLogContains("select * from `test_models` where `test_models`.`name` is null"); expect($models->count())->toEqual(1); });