aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Config/UserConfigTest.php
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2025-06-24 11:46:45 +0200
committerRichard Steinmetz <richard@steinmetz.cloud>2025-06-24 11:46:45 +0200
commit6d2b11f166d0859b2baaee68fcaa376d9274d3c0 (patch)
tree9be2dfb0328d9f3a1ffedf15b7492122cc1e580f /tests/lib/Config/UserConfigTest.php
parent80f474c343cef6f766989755c2edd36a5c0b1b6e (diff)
downloadnextcloud-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.php13
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 [