mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
DEV: Remove unnecessary rails_helper requiring (#26364)
This commit is contained in:
parent
5adfb299ac
commit
4c860995e0
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Mailer do
|
describe Chat::Mailer do
|
||||||
fab!(:chatters_group) { Fabricate(:group) }
|
fab!(:chatters_group) { Fabricate(:group) }
|
||||||
fab!(:sender) { Fabricate(:user, group_ids: [chatters_group.id], refresh_auto_groups: true) }
|
fab!(:sender) { Fabricate(:user, group_ids: [chatters_group.id], refresh_auto_groups: true) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::MessageRateLimiter do
|
describe Chat::MessageRateLimiter do
|
||||||
fab!(:user) { Fabricate(:user, trust_level: 3) }
|
fab!(:user) { Fabricate(:user, trust_level: 3) }
|
||||||
let(:limiter) { described_class.new(user) }
|
let(:limiter) { described_class.new(user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Seeder do
|
describe Chat::Seeder do
|
||||||
fab!(:staff_category) { Fabricate(:private_category, name: "Staff", group: Group[:staff]) }
|
fab!(:staff_category) { Fabricate(:private_category, name: "Staff", group: Group[:staff]) }
|
||||||
fab!(:general_category) { Fabricate(:category, name: "General") }
|
fab!(:general_category) { Fabricate(:category, name: "General") }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe "API keys scoped to chat#create_message" do
|
describe "API keys scoped to chat#create_message" do
|
||||||
before do
|
before do
|
||||||
SiteSetting.chat_enabled = true
|
SiteSetting.chat_enabled = true
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe "Plugin API for chat" do
|
describe "Plugin API for chat" do
|
||||||
before { SiteSetting.chat_enabled = true }
|
before { SiteSetting.chat_enabled = true }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::Chat::AutoJoinChannelBatch do
|
describe Jobs::Chat::AutoJoinChannelBatch do
|
||||||
it "can successfully queue this job" do
|
it "can successfully queue this job" do
|
||||||
expect {
|
expect {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::Chat::AutoJoinChannelMemberships do
|
describe Jobs::Chat::AutoJoinChannelMemberships do
|
||||||
let(:user) { Fabricate(:user, last_seen_at: 15.minutes.ago) }
|
let(:user) { Fabricate(:user, last_seen_at: 15.minutes.ago) }
|
||||||
let(:category) { Fabricate(:category, user: user) }
|
let(:category) { Fabricate(:category, user: user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::Chat::ChannelArchive do
|
describe Jobs::Chat::ChannelArchive do
|
||||||
fab!(:chat_channel) { Fabricate(:category_channel) }
|
fab!(:chat_channel) { Fabricate(:category_channel) }
|
||||||
fab!(:user) { Fabricate(:user, admin: true) }
|
fab!(:user) { Fabricate(:user, admin: true) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::Chat::NotifyMentioned do
|
describe Jobs::Chat::NotifyMentioned do
|
||||||
subject(:job) { described_class.new }
|
subject(:job) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::Chat::ProcessMessage do
|
describe Jobs::Chat::ProcessMessage do
|
||||||
fab!(:chat_message) { Fabricate(:chat_message, message: "https://discourse.org/team") }
|
fab!(:chat_message) { Fabricate(:chat_message, message: "https://discourse.org/team") }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::Chat::AutoJoinUsers do
|
describe Jobs::Chat::AutoJoinUsers do
|
||||||
subject(:job) { described_class.new }
|
subject(:job) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::Chat::DeleteOldMessages do
|
describe Jobs::Chat::DeleteOldMessages do
|
||||||
base_date = DateTime.parse("2020-12-01 00:00 UTC")
|
base_date = DateTime.parse("2020-12-01 00:00 UTC")
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ChannelArchiveService do
|
describe Chat::ChannelArchiveService do
|
||||||
class FakeArchiveError < StandardError
|
class FakeArchiveError < StandardError
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::DuplicateMessageValidator do
|
describe Chat::DuplicateMessageValidator do
|
||||||
let(:chat_channel) { Fabricate(:chat_channel) }
|
let(:chat_channel) { Fabricate(:chat_channel) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::GuardianExtensions do
|
RSpec.describe Chat::GuardianExtensions do
|
||||||
fab!(:chatters) { Fabricate(:group) }
|
fab!(:chatters) { Fabricate(:group) }
|
||||||
fab!(:user) { Fabricate(:user, group_ids: [chatters.id], refresh_auto_groups: true) }
|
fab!(:user) { Fabricate(:user, group_ids: [chatters.id], refresh_auto_groups: true) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::MessageBookmarkable do
|
describe Chat::MessageBookmarkable do
|
||||||
subject(:registered_bookmarkable) { RegisteredBookmarkable.new(described_class) }
|
subject(:registered_bookmarkable) { RegisteredBookmarkable.new(described_class) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::MessageMover do
|
describe Chat::MessageMover do
|
||||||
fab!(:acting_user) { Fabricate(:admin, username: "testmovechat") }
|
fab!(:acting_user) { Fabricate(:admin, username: "testmovechat") }
|
||||||
fab!(:source_channel) { Fabricate(:category_channel) }
|
fab!(:source_channel) { Fabricate(:category_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::MessageReactor do
|
describe Chat::MessageReactor do
|
||||||
subject(:message_reactor) { described_class.new(reacting_user, channel) }
|
subject(:message_reactor) { described_class.new(reacting_user, channel) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Notifier do
|
describe Chat::Notifier do
|
||||||
describe "#notify_new" do
|
describe "#notify_new" do
|
||||||
fab!(:channel) { Fabricate(:category_channel) }
|
fab!(:channel) { Fabricate(:category_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::OneboxHandler do
|
describe Chat::OneboxHandler do
|
||||||
fab!(:private_category) { Fabricate(:private_category, group: Fabricate(:group)) }
|
fab!(:private_category) { Fabricate(:private_category, group: Fabricate(:group)) }
|
||||||
fab!(:private_channel) { Fabricate(:category_channel, chatable: private_category) }
|
fab!(:private_channel) { Fabricate(:category_channel, chatable: private_category) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::ParsedMentions do
|
RSpec.describe Chat::ParsedMentions do
|
||||||
fab!(:channel_member_1) { Fabricate(:user) }
|
fab!(:channel_member_1) { Fabricate(:user) }
|
||||||
fab!(:channel_member_2) { Fabricate(:user) }
|
fab!(:channel_member_2) { Fabricate(:user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::PostNotificationHandler do
|
describe Chat::PostNotificationHandler do
|
||||||
subject(:handler) { described_class.new(post, notified_users) }
|
subject(:handler) { described_class.new(post, notified_users) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ReviewQueue do
|
describe Chat::ReviewQueue do
|
||||||
subject(:queue) { described_class.new }
|
subject(:queue) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::SlackCompatibility do
|
describe Chat::SlackCompatibility do
|
||||||
describe "#process_text" do
|
describe "#process_text" do
|
||||||
it "converts mrkdwn links to regular markdown" do
|
it "converts mrkdwn links to regular markdown" do
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::TranscriptService do
|
describe Chat::TranscriptService do
|
||||||
let(:acting_user) { Fabricate(:user) }
|
let(:acting_user) { Fabricate(:user) }
|
||||||
let(:user1) { Fabricate(:user, username: "martinchat") }
|
let(:user1) { Fabricate(:user, username: "martinchat") }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Types::Array do
|
RSpec.describe Chat::Types::Array do
|
||||||
subject(:type) { described_class.new }
|
subject(:type) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe ChatSDK::Channel do
|
describe ChatSDK::Channel do
|
||||||
describe ".messages" do
|
describe ".messages" do
|
||||||
fab!(:channel_1) { Fabricate(:chat_channel) }
|
fab!(:channel_1) { Fabricate(:chat_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe ChatSDK::Message do
|
describe ChatSDK::Message do
|
||||||
describe ".create" do
|
describe ".create" do
|
||||||
fab!(:channel_1) { Fabricate(:chat_channel) }
|
fab!(:channel_1) { Fabricate(:chat_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe ChatSDK::Thread do
|
describe ChatSDK::Thread do
|
||||||
describe ".update_title" do
|
describe ".update_title" do
|
||||||
fab!(:thread_1) { Fabricate(:chat_thread) }
|
fab!(:thread_1) { Fabricate(:chat_thread) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe UserNotifications do
|
describe UserNotifications do
|
||||||
fab!(:chatters_group) { Fabricate(:group) }
|
fab!(:chatters_group) { Fabricate(:group) }
|
||||||
fab!(:sender) { Fabricate(:user, group_ids: [chatters_group.id], refresh_auto_groups: true) }
|
fab!(:sender) { Fabricate(:user, group_ids: [chatters_group.id], refresh_auto_groups: true) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Category do
|
RSpec.describe Category do
|
||||||
it_behaves_like "a chatable model" do
|
it_behaves_like "a chatable model" do
|
||||||
fab!(:chatable) { Fabricate(:category) }
|
fab!(:chatable) { Fabricate(:category) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::DirectMessage do
|
describe Chat::DirectMessage do
|
||||||
fab!(:user1) { Fabricate(:user, username: "chatdmfellow1") }
|
fab!(:user1) { Fabricate(:user, username: "chatdmfellow1") }
|
||||||
fab!(:user2) { Fabricate(:user, username: "chatdmuser") }
|
fab!(:user2) { Fabricate(:user, username: "chatdmuser") }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Message do
|
describe Chat::Message do
|
||||||
fab!(:message) { Fabricate(:chat_message, message: "hey friend, what's up?!") }
|
fab!(:message) { Fabricate(:chat_message, message: "hey friend, what's up?!") }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::NullMessage do
|
describe Chat::NullMessage do
|
||||||
subject(:null_message) { described_class.new }
|
subject(:null_message) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::NullUser do
|
describe Chat::NullUser do
|
||||||
subject(:null_user) { described_class.new }
|
subject(:null_user) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::ReviewableMessage, type: :model do
|
RSpec.describe Chat::ReviewableMessage, type: :model do
|
||||||
fab!(:moderator)
|
fab!(:moderator)
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe UserOption do
|
RSpec.describe UserOption do
|
||||||
describe "#chat_separate_sidebar_mode" do
|
describe "#chat_separate_sidebar_mode" do
|
||||||
it "is present" do
|
it "is present" do
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe User do
|
RSpec.describe User do
|
||||||
it { is_expected.to have_many(:user_chat_channel_memberships).dependent(:destroy) }
|
it { is_expected.to have_many(:user_chat_channel_memberships).dependent(:destroy) }
|
||||||
it { is_expected.to have_many(:chat_message_reactions).dependent(:destroy) }
|
it { is_expected.to have_many(:chat_message_reactions).dependent(:destroy) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat do
|
describe Chat do
|
||||||
before do
|
before do
|
||||||
SiteSetting.clean_up_uploads = true
|
SiteSetting.clean_up_uploads = true
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ChannelMembershipsQuery do
|
describe Chat::ChannelMembershipsQuery do
|
||||||
fab!(:user_1) { Fabricate(:user, username: "Aline", name: "Boetie") }
|
fab!(:user_1) { Fabricate(:user, username: "Aline", name: "Boetie") }
|
||||||
fab!(:user_2) { Fabricate(:user, username: "Bertrand", name: "Arlan") }
|
fab!(:user_2) { Fabricate(:user, username: "Bertrand", name: "Arlan") }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ChannelUnreadsQuery do
|
describe Chat::ChannelUnreadsQuery do
|
||||||
subject(:query) do
|
subject(:query) do
|
||||||
described_class.call(
|
described_class.call(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ThreadUnreadsQuery do
|
describe Chat::ThreadUnreadsQuery do
|
||||||
subject(:query) do
|
subject(:query) do
|
||||||
described_class.call(
|
described_class.call(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::UsersFromUsernamesAndGroupsQuery do
|
describe Chat::UsersFromUsernamesAndGroupsQuery do
|
||||||
fab!(:user1) { Fabricate(:user) }
|
fab!(:user1) { Fabricate(:user) }
|
||||||
fab!(:user2) { Fabricate(:user) }
|
fab!(:user2) { Fabricate(:user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::ChatController do
|
RSpec.describe Chat::ChatController do
|
||||||
describe "#export_messages" do
|
describe "#export_messages" do
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe ApplicationController do
|
RSpec.describe ApplicationController do
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
fab!(:admin)
|
fab!(:admin)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Admin::IncomingWebhooksController do
|
RSpec.describe Chat::Admin::IncomingWebhooksController do
|
||||||
fab!(:admin)
|
fab!(:admin)
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Api::CategoryChatablesController do
|
describe Chat::Api::CategoryChatablesController do
|
||||||
describe "#access_by_category" do
|
describe "#access_by_category" do
|
||||||
fab!(:group)
|
fab!(:group)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelMessagesController do
|
RSpec.describe Chat::Api::ChannelMessagesController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
fab!(:channel) { Fabricate(:chat_channel) }
|
fab!(:channel) { Fabricate(:chat_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelThreadMessagesController do
|
RSpec.describe Chat::Api::ChannelThreadMessagesController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
fab!(:thread) do
|
fab!(:thread) do
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelThreadsController do
|
RSpec.describe Chat::Api::ChannelThreadsController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
fab!(:public_channel) { Fabricate(:chat_channel, threading_enabled: true) }
|
fab!(:public_channel) { Fabricate(:chat_channel, threading_enabled: true) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelsArchivesController do
|
RSpec.describe Chat::Api::ChannelsArchivesController do
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
fab!(:admin)
|
fab!(:admin)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelsController do
|
RSpec.describe Chat::Api::ChannelsController do
|
||||||
before do
|
before do
|
||||||
SiteSetting.chat_enabled = true
|
SiteSetting.chat_enabled = true
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Api::ChannelsCurrentUserMembershipController do
|
describe Chat::Api::ChannelsCurrentUserMembershipController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
fab!(:channel_1) { Fabricate(:category_channel) }
|
fab!(:channel_1) { Fabricate(:category_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Api::ChannelsCurrentUserMembershipController do
|
describe Chat::Api::ChannelsCurrentUserMembershipController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
fab!(:channel_1) { Fabricate(:category_channel) }
|
fab!(:channel_1) { Fabricate(:category_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelsInvitesController do
|
RSpec.describe Chat::Api::ChannelsInvitesController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
fab!(:channel_1) { Fabricate(:chat_channel) }
|
fab!(:channel_1) { Fabricate(:chat_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelsMessagesStreamingController do
|
RSpec.describe Chat::Api::ChannelsMessagesStreamingController do
|
||||||
fab!(:channel_1) { Fabricate(:chat_channel) }
|
fab!(:channel_1) { Fabricate(:chat_channel) }
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelsMessagesMovesController do
|
RSpec.describe Chat::Api::ChannelsMessagesMovesController do
|
||||||
fab!(:channel) { Fabricate(:category_channel) }
|
fab!(:channel) { Fabricate(:category_channel) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChannelsStatusController do
|
RSpec.describe Chat::Api::ChannelsStatusController do
|
||||||
fab!(:channel_1) { Fabricate(:category_channel, status: :open) }
|
fab!(:channel_1) { Fabricate(:category_channel, status: :open) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::Api::ChatablesController do
|
RSpec.describe Chat::Api::ChatablesController do
|
||||||
before do
|
before do
|
||||||
SiteSetting.chat_enabled = true
|
SiteSetting.chat_enabled = true
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Api::CurrentUserChannelsController do
|
describe Chat::Api::CurrentUserChannelsController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Api::CurrentUserThreadsController do
|
describe Chat::Api::CurrentUserThreadsController do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
fab!(:current_user) { Fabricate(:user) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::IncomingWebhooksController do
|
RSpec.describe Chat::IncomingWebhooksController do
|
||||||
fab!(:chat_channel) { Fabricate(:category_channel) }
|
fab!(:chat_channel) { Fabricate(:category_channel) }
|
||||||
fab!(:webhook) { Fabricate(:incoming_chat_webhook, chat_channel: chat_channel) }
|
fab!(:webhook) { Fabricate(:incoming_chat_webhook, chat_channel: chat_channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::ChatController do
|
RSpec.describe Chat::ChatController do
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
fab!(:other_user) { Fabricate(:user) }
|
fab!(:other_user) { Fabricate(:user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe EmailController do
|
describe EmailController do
|
||||||
describe "unsubscribing from chat email settings" do
|
describe "unsubscribing from chat email settings" do
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::DirectMessagesController do
|
RSpec.describe Chat::DirectMessagesController do
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
fab!(:user1) { Fabricate(:user) }
|
fab!(:user1) { Fabricate(:user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::EmojisController do
|
RSpec.describe Chat::EmojisController do
|
||||||
fab!(:user_1) { Fabricate(:user) }
|
fab!(:user_1) { Fabricate(:user) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ChannelSerializer do
|
describe Chat::ChannelSerializer do
|
||||||
subject(:serializer) { described_class.new(chat_channel, scope: guardian, root: nil) }
|
subject(:serializer) { described_class.new(chat_channel, scope: guardian, root: nil) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::MessageSerializer do
|
describe Chat::MessageSerializer do
|
||||||
subject(:serializer) { described_class.new(message_1, scope: guardian, root: nil) }
|
subject(:serializer) { described_class.new(message_1, scope: guardian, root: nil) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::MessageUserSerializer do
|
RSpec.describe Chat::MessageUserSerializer do
|
||||||
subject(:serializer) do
|
subject(:serializer) do
|
||||||
user = Fabricate(:user, **params)
|
user = Fabricate(:user, **params)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ThreadOriginalMessageSerializer do
|
describe Chat::ThreadOriginalMessageSerializer do
|
||||||
subject(:serializer) { described_class.new(message_1, scope: guardian, root: nil) }
|
subject(:serializer) { described_class.new(message_1, scope: guardian, root: nil) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::ChatablesSerializer do
|
describe Chat::ChatablesSerializer do
|
||||||
context "with status" do
|
context "with status" do
|
||||||
fab!(:user_1) { Fabricate(:user) }
|
fab!(:user_1) { Fabricate(:user) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::DirectMessageSerializer do
|
describe Chat::DirectMessageSerializer do
|
||||||
describe "#user" do
|
describe "#user" do
|
||||||
it "returns you when there are two of us" do
|
it "returns you when there are two of us" do
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::InReplyToSerializer do
|
RSpec.describe Chat::InReplyToSerializer do
|
||||||
subject(:serializer) { described_class.new(message, scope: guardian, root: nil) }
|
subject(:serializer) { described_class.new(message, scope: guardian, root: nil) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Chat::ThreadOriginalMessageSerializer do
|
RSpec.describe Chat::ThreadOriginalMessageSerializer do
|
||||||
describe "#user" do
|
describe "#user" do
|
||||||
fab!(:user_status) { Fabricate(:user_status) }
|
fab!(:user_status) { Fabricate(:user_status) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::AutoJoinChannelBatch do
|
describe Chat::AutoJoinChannelBatch do
|
||||||
describe Chat::AutoJoinChannelBatch::Contract, type: :model do
|
describe Chat::AutoJoinChannelBatch::Contract, type: :model do
|
||||||
subject(:contract) { described_class.new(start_user_id: 10) }
|
subject(:contract) { described_class.new(start_user_id: 10) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::Publisher do
|
describe Chat::Publisher do
|
||||||
fab!(:channel) { Fabricate(:category_channel) }
|
fab!(:channel) { Fabricate(:category_channel) }
|
||||||
fab!(:message_1) { Fabricate(:chat_message, chat_channel: channel) }
|
fab!(:message_1) { Fabricate(:chat_message, chat_channel: channel) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Chat::DefaultChannelValidator do
|
describe Chat::DefaultChannelValidator do
|
||||||
fab!(:channel) { Fabricate(:category_channel) }
|
fab!(:channel) { Fabricate(:category_channel) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe PrettyText do
|
describe PrettyText do
|
||||||
describe "markdown it" do
|
describe "markdown it" do
|
||||||
it "can properly bake boxes" do
|
it "can properly bake boxes" do
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
require "pretty_text"
|
require "pretty_text"
|
||||||
|
|
||||||
RSpec.describe PrettyText do
|
RSpec.describe PrettyText do
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
require "pretty_text"
|
require "pretty_text"
|
||||||
|
|
||||||
RSpec.describe PrettyText do
|
RSpec.describe PrettyText do
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe PrettyText do
|
describe PrettyText do
|
||||||
before { Jobs.run_immediately! }
|
before { Jobs.run_immediately! }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe ::DiscoursePoll::PollsController do
|
RSpec.describe ::DiscoursePoll::PollsController do
|
||||||
routes { ::DiscoursePoll::Engine.routes }
|
routes { ::DiscoursePoll::Engine.routes }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe PostsController do
|
RSpec.describe PostsController do
|
||||||
let!(:user) { Fabricate(:user, refresh_auto_groups: true) }
|
let!(:user) { Fabricate(:user, refresh_auto_groups: true) }
|
||||||
let!(:title) { "Testing Poll Plugin" }
|
let!(:title) { "Testing Poll Plugin" }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe "DiscoursePoll endpoints" do
|
RSpec.describe "DiscoursePoll endpoints" do
|
||||||
describe "fetch voters for a poll" do
|
describe "fetch voters for a poll" do
|
||||||
fab!(:user)
|
fab!(:user)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Jobs::ClosePoll do
|
RSpec.describe Jobs::ClosePoll do
|
||||||
let(:post) { Fabricate(:post, raw: "[poll]\n- A\n- B\n[/poll]") }
|
let(:post) { Fabricate(:post, raw: "[poll]\n- A\n- B\n[/poll]") }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe NewPostManager do
|
RSpec.describe NewPostManager do
|
||||||
let(:user) { Fabricate(:newuser, refresh_auto_groups: true) }
|
let(:user) { Fabricate(:newuser, refresh_auto_groups: true) }
|
||||||
let(:admin) { Fabricate(:admin, refresh_auto_groups: true) }
|
let(:admin) { Fabricate(:admin, refresh_auto_groups: true) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe ::DiscoursePoll::PollsValidator do
|
RSpec.describe ::DiscoursePoll::PollsValidator do
|
||||||
subject(:validator) { described_class.new(post) }
|
subject(:validator) { described_class.new(post) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe PostsController do
|
RSpec.describe PostsController do
|
||||||
let(:admin) { Fabricate(:admin) }
|
let(:admin) { Fabricate(:admin) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Admin::UsersController do
|
RSpec.describe Admin::UsersController do
|
||||||
let(:admin) { Fabricate(:admin) }
|
let(:admin) { Fabricate(:admin) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe PrettyText do
|
describe PrettyText do
|
||||||
let(:post) { Fabricate(:post) }
|
let(:post) { Fabricate(:post) }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe PrettyText do
|
describe PrettyText do
|
||||||
it "should remove spoilers from excerpts" do
|
it "should remove spoilers from excerpts" do
|
||||||
expect(
|
expect(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
require "rails/generators"
|
require "rails/generators"
|
||||||
require "generators/site_setting_move_to_groups_migration/site_setting_move_to_groups_migration_generator"
|
require "generators/site_setting_move_to_groups_migration/site_setting_move_to_groups_migration_generator"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
require "rails/generators"
|
require "rails/generators"
|
||||||
require "generators/site_setting_rename_migration/site_setting_rename_migration_generator"
|
require "generators/site_setting_rename_migration/site_setting_rename_migration_generator"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
describe Jobs::CleanUpTags do
|
describe Jobs::CleanUpTags do
|
||||||
subject(:job) { described_class.new }
|
subject(:job) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Jobs::UpdatePostUploadsSecureStatus do
|
RSpec.describe Jobs::UpdatePostUploadsSecureStatus do
|
||||||
fab!(:post)
|
fab!(:post)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Jobs::SyncAclsForUploads do
|
RSpec.describe Jobs::SyncAclsForUploads do
|
||||||
let(:upload1) { Fabricate(:upload) }
|
let(:upload1) { Fabricate(:upload) }
|
||||||
let(:upload2) { Fabricate(:upload) }
|
let(:upload2) { Fabricate(:upload) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe FormTemplateYamlValidator, type: :validator do
|
RSpec.describe FormTemplateYamlValidator, type: :validator do
|
||||||
subject(:validator) { described_class.new }
|
subject(:validator) { described_class.new }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe BadgeGrouping, type: :model do
|
RSpec.describe BadgeGrouping, type: :model do
|
||||||
it { is_expected.to validate_length_of(:name).is_at_most(100) }
|
it { is_expected.to validate_length_of(:name).is_at_most(100) }
|
||||||
it { is_expected.to validate_length_of(:description).is_at_most(500) }
|
it { is_expected.to validate_length_of(:description).is_at_most(500) }
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe FormTemplate, type: :model do
|
RSpec.describe FormTemplate, type: :model do
|
||||||
it "can't have duplicate names" do
|
it "can't have duplicate names" do
|
||||||
Fabricate(:form_template, name: "Bug Report", template: "- type: input\n id: name")
|
Fabricate(:form_template, name: "Bug Report", template: "- type: input\n id: name")
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails_helper"
|
|
||||||
|
|
||||||
RSpec.describe Sitemap do
|
RSpec.describe Sitemap do
|
||||||
describe ".regenerate_sitemaps" do
|
describe ".regenerate_sitemaps" do
|
||||||
fab!(:topic)
|
fab!(:topic)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user