From ebf7c085dd786b174055be389ba5fef35fae861a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 31 Dec 2020 16:06:11 +0100 Subject: [PATCH] feat: default gender to unknown (#4753) --- CHANGELOG.md | 2 +- app/Helpers/AccountHelper.php | 2 +- tests/Unit/Helpers/AccountHelperTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f652fb7b29f..c0823b66e2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### Enhancements: -* +* Use Unknown as default gender ### Fixes: diff --git a/app/Helpers/AccountHelper.php b/app/Helpers/AccountHelper.php index dc711276d2b..30a607943f3 100644 --- a/app/Helpers/AccountHelper.php +++ b/app/Helpers/AccountHelper.php @@ -82,7 +82,7 @@ public static function canDowngrade(Account $account): bool */ public static function getDefaultGender(Account $account): string { - $defaultGenderType = Gender::MALE; + $defaultGenderType = Gender::UNKNOWN; if ($account->default_gender_id) { $defaultGender = Gender::where([ diff --git a/tests/Unit/Helpers/AccountHelperTest.php b/tests/Unit/Helpers/AccountHelperTest.php index 770dfc6e5d8..8af67079d1f 100644 --- a/tests/Unit/Helpers/AccountHelperTest.php +++ b/tests/Unit/Helpers/AccountHelperTest.php @@ -154,7 +154,7 @@ public function it_gets_the_default_gender_for_the_account(): void $account = factory(Account::class)->create(); $this->assertEquals( - Gender::MALE, + Gender::UNKNOWN, AccountHelper::getDefaultGender($account) );