mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: prevents flakey test (#19976)
This commit is contained in:
@@ -238,16 +238,19 @@ RSpec.describe Chat::Api::ChatChannelsController do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "generates a valid new slug to prevent collisions" do
|
it "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"))
|
freeze_time(DateTime.parse("2022-07-08 09:30:00"))
|
||||||
old_slug = channel_1.slug
|
old_slug = channel_1.slug
|
||||||
|
|
||||||
delete "/chat/api/channels/#{channel_1.id}",
|
delete(
|
||||||
params: {
|
"/chat/api/channels/#{channel_1.id}",
|
||||||
channel: {
|
params: {
|
||||||
name_confirmation: channel_1.title(current_user),
|
channel: {
|
||||||
},
|
name_confirmation: channel_1.title(current_user),
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
expect(channel_1.reload.slug).to eq(
|
expect(channel_1.reload.slug).to eq(
|
||||||
|
|||||||
Reference in New Issue
Block a user