2
0

Use pluck on DomainAllow.allowed_domains for export (#36019)

This commit is contained in:
Matt Jankowski
2025-09-05 08:30:18 -04:00
committed by GitHub
parent 350a802851
commit 3efba15b3c
5 changed files with 44 additions and 22 deletions

View File

@@ -12,4 +12,19 @@ RSpec.describe DomainAllow do
it { is_expected.to_not allow_value('xn--r9j5b5b').for(:domain) }
end
end
describe '.allowed_domains' do
subject { described_class.allowed_domains }
context 'without domain allows' do
it { is_expected.to be_an(Array).and(be_empty) }
end
context 'with domain allows' do
let!(:allowed_domain) { Fabricate :domain_allow }
let!(:other_allowed_domain) { Fabricate :domain_allow }
it { is_expected.to contain_exactly(allowed_domain.domain, other_allowed_domain.domain) }
end
end
end