mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 16:06:10 +00:00
FEATURE: Chat and Sidebar are now on by default - Set the sidebar site setting to be enabled by default - Set the chat site setting to be enabled by default - Updated existing specs that assumed the original default - Use a migration to keep old defaults for existing sites
26 lines
593 B
Ruby
26 lines
593 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe Jobs::EmailChatNotifications do
|
|
before { Jobs.run_immediately! }
|
|
|
|
context "when chat is enabled" do
|
|
before { SiteSetting.chat_enabled = true }
|
|
|
|
it "starts the mailer" do
|
|
Chat::ChatMailer.expects(:send_unread_mentions_summary)
|
|
|
|
Jobs.enqueue(:email_chat_notifications)
|
|
end
|
|
end
|
|
|
|
context "when chat is not enabled" do
|
|
before { SiteSetting.chat_enabled = false }
|
|
|
|
it "does nothing" do
|
|
Chat::ChatMailer.expects(:send_unread_mentions_summary).never
|
|
|
|
Jobs.enqueue(:email_chat_notifications)
|
|
end
|
|
end
|
|
end
|