FIX: Remove chat default channel setting (#28170)

* FIX: Remove chat default channel being applied to mobile chat and drawer

* DEV: removing chat_default_channel_id setting

* DEV: add migration to remove chat default channel id

* DEV: remove default_channel_validator and tests
This commit is contained in:
Gabriel Grubba
2024-07-31 14:12:10 -03:00
committed by GitHub
parent 30048ab97f
commit 633a19fcc0
7 changed files with 11 additions and 74 deletions

View File

@ -1,26 +0,0 @@
# frozen_string_literal: true
describe Chat::DefaultChannelValidator do
fab!(:channel) { Fabricate(:category_channel) }
it "provides an error message" do
validator = described_class.new
expect(validator.error_message).to eq(I18n.t("site_settings.errors.chat_default_channel"))
end
it "returns true if public channel id" do
validator = described_class.new
expect(validator.valid_value?(channel.id)).to eq(true)
end
it "returns true if empty string" do
validator = described_class.new
expect(validator.valid_value?("")).to eq(true)
end
it "returns false if not a public channel" do
validator = described_class.new
channel.destroy!
expect(validator.valid_value?(channel.id)).to eq(false)
end
end