diff --git a/tests/Unit/Views/Filters/BooleanFilterTest.php b/tests/Unit/Views/Filters/BooleanFilterTest.php index 0215c4a89..5e834a339 100644 --- a/tests/Unit/Views/Filters/BooleanFilterTest.php +++ b/tests/Unit/Views/Filters/BooleanFilterTest.php @@ -73,4 +73,26 @@ public function test_can_get_if_boolean_filter_not_empty_string(): void { $this->assertFalse(self::$filterInstance->isEmpty('0')); } + + public function test_can_validate_null_boolean_filter_value(): void + { + $filter = self::$filterInstance; + $filter->setFilterPillValues([ + true => 'Active', + false => 'Inactive', + ]); + + $this->assertFalse($filter->validate(null)); + } + + public function test_is_empty_null_boolean_filter_value(): void + { + $filter = self::$filterInstance; + $filter->setFilterPillValues([ + true => 'Active', + false => 'Inactive', + ]); + + $this->assertTrue($filter->isEmpty(null)); + } }