Skip to content

Commit

Permalink
Tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVanderbist committed Dec 23, 2024
1 parent de6a10d commit d064882
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand All @@ -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);
});

Expand Down

0 comments on commit d064882

Please sign in to comment.