DEV: Move discourse-chat to the core repo. (#18776)

As part of this move, we are also renaming `discourse-chat` to `chat`.
This commit is contained in:
Roman Rizzi
2022-11-02 10:41:30 -03:00
committed by GitHub
parent e7e24843dc
commit 0a5f548635
697 changed files with 61642 additions and 40 deletions

View File

@ -0,0 +1,27 @@
# frozen_string_literal: true
require "rails_helper"
describe "Plugin API for chat" do
before { SiteSetting.chat_enabled = true }
let(:metadata) do
metadata = Plugin::Metadata.new
metadata.name = "test"
metadata
end
let(:plugin_instance) do
plugin = Plugin::Instance.new(nil, "/tmp/test.rb")
plugin.metadata = metadata
plugin
end
describe "chat.enable_markdown_feature" do
it "stores the markdown feature" do
plugin_instance.chat.enable_markdown_feature(:foo)
expect(DiscoursePluginRegistry.chat_markdown_features.include?(:foo)).to be_truthy
end
end
end