channel_folders: Add tests for case-insensitive duplicate name check.

This commit adds tests for checking the requirement of folder
names to be unique case insensitively.
This commit is contained in:
Sahil Batra
2025-05-21 13:00:33 +05:30
committed by Tim Abbott
parent 88b47be938
commit 677390d3f6
2 changed files with 13 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ def check_channel_folder_name(name: str, realm: Realm) -> None:
)
if ChannelFolder.objects.filter(name__iexact=name, realm=realm).exists():
raise JsonableError(_("Channel folder '{name}' already exists").format(name=name))
raise JsonableError(_("Channel folder name already in use"))
def render_channel_folder_description(text: str, realm: Realm, *, acting_user: UserProfile) -> str: