A platform for community discussion. Free, open, simple.
DEV: prevents flakey test (#19976)
Joffrey JAFFEUX857f35f92090
diff --git a/plugins/chat/spec/requests/api/chat_channels_controller_spec.rb b/plugins/chat/spec/requests/api/chat_channels_controller_spec.rbindex d633749a330..96d48c05b43 100644--- a/plugins/chat/spec/requests/api/chat_channels_controller_spec.rb+++ b/plugins/chat/spec/requests/api/chat_channels_controller_spec.rb@@ -238,16 +238,19 @@ RSpec.describe Chat::Api::ChatChannelsController doendit "generates a valid new slug to prevent collisions" do- SiteSetting.max_topic_title_length = 15+ SiteSetting.max_topic_title_length = 20+ channel_1 = Fabricate(:chat_channel, name: "a" * SiteSetting.max_topic_title_length)freeze_time(DateTime.parse("2022-07-08 09:30:00"))old_slug = channel_1.slug- delete "/chat/api/channels/#{channel_1.id}",- params: {- channel: {- name_confirmation: channel_1.title(current_user),- },- }+ delete(+ "/chat/api/channels/#{channel_1.id}",+ params: {+ channel: {+ name_confirmation: channel_1.title(current_user),+ },+ },+ )expect(response.status).to eq(200)expect(channel_1.reload.slug).to eq(