diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2025-06-24 11:46:45 +0200 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2025-06-24 11:46:45 +0200 |
commit | 6d2b11f166d0859b2baaee68fcaa376d9274d3c0 (patch) | |
tree | 9be2dfb0328d9f3a1ffedf15b7492122cc1e580f /tests/lib/Config/UserConfigTest.php | |
parent | 80f474c343cef6f766989755c2edd36a5c0b1b6e (diff) | |
download | nextcloud-server-fix/revive-lowercase-email.tar.gz nextcloud-server-fix/revive-lowercase-email.zip |
fixup! fix: revive always storing lowercased email addresses in AllConfigfix/revive-lowercase-email
Diffstat (limited to 'tests/lib/Config/UserConfigTest.php')
-rw-r--r-- | tests/lib/Config/UserConfigTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/Config/UserConfigTest.php b/tests/lib/Config/UserConfigTest.php index 865575374d8..e27e831f425 100644 --- a/tests/lib/Config/UserConfigTest.php +++ b/tests/lib/Config/UserConfigTest.php @@ -1241,6 +1241,19 @@ class UserConfigTest extends TestCase { } } + /** + * This test needs to stay! Emails are expected to be lowercase due to performance reasons. + * This way we can skip the expensive casing change on the database. + */ + public function testSetValueMixedWithSettingsEmail(): void { + $userConfig = $this->generateUserConfig(); + + $edited = $userConfig->setValueMixed('user1', 'settings', 'email', 'mixed.CASE@Nextcloud.com'); + $this->assertTrue($edited); + + $actual = $userConfig->getValueMixed('user1', 'settings', 'email'); + $this->assertEquals('mixed.case@nextcloud.com', $actual); + } public static function providerSetValueString(): array { return [ |