DEV: Don’t provide an array to site settings group lists in specs

This is extracted from https://github.com/discourse/discourse/pull/29129.

In some chat specs, we provide an array as a value for group lists like
`chat_allowed_groups`, which is wrong. This results in a value like
`"1|2|[3]"` instead of `"1|2|3"`.
This commit is contained in:
Loïc Guitaut
2024-10-16 14:25:47 +02:00
committed by Loïc Guitaut
parent 5d657c8c41
commit 93e02069b0
14 changed files with 15 additions and 15 deletions

View File

@ -9,7 +9,7 @@ RSpec.describe Chat::Api::ChannelsMessagesFlagsController do
before do
SiteSetting.chat_enabled = true
SiteSetting.chat_allowed_groups = Group::AUTO_GROUPS[:everyone]
SiteSetting.chat_message_flag_allowed_groups = [Group::AUTO_GROUPS[:everyone]]
SiteSetting.chat_message_flag_allowed_groups = Group::AUTO_GROUPS[:everyone]
sign_in(current_user)
end

View File

@ -8,7 +8,7 @@ RSpec.describe BookmarksController do
before do
register_test_bookmarkable(Chat::MessageBookmarkable)
SiteSetting.chat_allowed_groups = [chatters]
SiteSetting.chat_allowed_groups = chatters
sign_in(current_user)
end

View File

@ -13,7 +13,7 @@ RSpec.describe NotificationsController do
before do
Jobs.run_immediately!
SiteSetting.chat_enabled = true
SiteSetting.chat_allowed_groups = [chatters.id]
SiteSetting.chat_allowed_groups = chatters.id
sign_in(user)
end

View File

@ -31,7 +31,7 @@ describe UsersController do
before do
register_test_bookmarkable(Chat::MessageBookmarkable)
SiteSetting.chat_allowed_groups = [chatters]
SiteSetting.chat_allowed_groups = chatters
sign_in(current_user)
end