summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-09-22 08:48:42 +0200
committerGitHub <noreply@github.com>2022-09-22 08:48:42 +0200
commit92383fa1158da049bb0109833506c6bedcb205ea (patch)
treebf9bd490c368e0441e3e2c8475f315c75755d12a /tests
parent5a941eb5519b343be7065aaba89d1b77b21691d0 (diff)
parente110129acb6f9ad65df4315480a88053975009c3 (diff)
Merge pull request #7924 from nextcloud/fix-room-length
Fix room length to make compatible with database length
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/chat/public.feature15
-rw-r--r--tests/php/Service/RoomServiceTest.php5
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/integration/features/chat/public.feature b/tests/integration/features/chat/public.feature
index 7f3391ec9..0c3a1ef6c 100644
--- a/tests/integration/features/chat/public.feature
+++ b/tests/integration/features/chat/public.feature
@@ -96,3 +96,18 @@ Feature: chat/public
| public room | guests | guest | | Message 3 | [] |
| public room | users | participant2 | participant2-displayname | Message 2 | [] |
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
+
+
+ Scenario: Create room with big name and rename
+ # 260 chars
+ When user "participant1" creates room "public room" with 400 (v4)
+ | roomType | 3 |
+ | roomName | A name with 260 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 |
+ # 255 chars
+ And user "participant1" creates room "public room" (v4)
+ | roomType | 3 |
+ | roomName | A name with 255 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123 |
+ # 260 chars
+ And user "participant1" renames room "public room" to "A name with 260 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678" with 400 (v4)
+ # 255 chars
+ And user "participant1" renames room "public room" to "Another name with 255 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567" with 200 (v4)
diff --git a/tests/php/Service/RoomServiceTest.php b/tests/php/Service/RoomServiceTest.php
index 4ee95a622..4f8626263 100644
--- a/tests/php/Service/RoomServiceTest.php
+++ b/tests/php/Service/RoomServiceTest.php
@@ -192,6 +192,11 @@ class RoomServiceTest extends TestCase {
[''],
[' '],
[str_repeat('a', 256)],
+ // Isn't a multibyte emoji
+ [str_repeat('😃', 256)],
+ // This is a multibyte emoji and need 2 chars in database
+ // 256 / 2 = 128
+ [str_repeat('‍💻', 128)],
];
}