mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
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:
@ -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
|
Reference in New Issue
Block a user