DEV: Remove unused test (#20964)

This commit is contained in:
Bianca Nenciu 2023-04-04 20:48:59 +03:00 committed by GitHub
parent e9cd74a9e7
commit e134b0b3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 30 deletions

View File

@ -1,30 +0,0 @@
# frozen_string_literal: true
RSpec.describe EnableInviteOnlyValidator do
subject { described_class.new }
context "when sso is enabled" do
before do
SiteSetting.discourse_connect_url = "https://example.com/sso"
SiteSetting.enable_discourse_connect = true
end
it "is valid when false" do
expect(subject.valid_value?("f")).to eq(true)
end
it "is isn't value for true" do
expect(subject.valid_value?("t")).to eq(false)
expect(subject.error_message).to eq(
I18n.t("site_settings.errors.discourse_connect_invite_only"),
)
end
end
context "when sso isn't enabled" do
it "is valid when true or false" do
expect(subject.valid_value?("f")).to eq(true)
expect(subject.valid_value?("t")).to eq(true)
end
end
end