From 6d2b11f166d0859b2baaee68fcaa376d9274d3c0 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Tue, 24 Jun 2025 11:46:45 +0200 Subject: fixup! fix: revive always storing lowercased email addresses in AllConfig --- tests/lib/Config/UserConfigTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/lib/Config/UserConfigTest.php') 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 [ -- cgit v1.2.3