From d105e85e203477021860ab2f7a568a3072b35faa Mon Sep 17 00:00:00 2001 From: Sebastiaan Luca Date: Sun, 13 Mar 2022 15:19:04 +0100 Subject: [PATCH] Add test --- tests/BooleanAttributeTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/BooleanAttributeTest.php b/tests/BooleanAttributeTest.php index f11cb7c..75c253f 100644 --- a/tests/BooleanAttributeTest.php +++ b/tests/BooleanAttributeTest.php @@ -234,6 +234,18 @@ public function it can disable a boolean attribute from an integer(): vo $this->assertNull($model->accepted_terms_at); } + /** + * @test + */ + public function it can disable a boolean attribute from an empty string(): void + { + $model = new TestModel; + + $model->has_accepted_terms = ''; + + $this->assertNull($model->accepted_terms_at); + } + /** * @test */