0
0
Fork 0

Finish email allow/deny list naming migration (#30530)

This commit is contained in:
Matt Jankowski 2024-08-13 03:37:32 -04:00 committed by GitHub
parent f6d090fdf5
commit 02df1b4e4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 43 additions and 44 deletions

View file

@ -9,10 +9,10 @@ describe EmailMxValidator do
context 'with an e-mail domain that is explicitly allowed' do
around do |block|
tmp = Rails.configuration.x.email_domains_whitelist
Rails.configuration.x.email_domains_whitelist = 'example.com'
tmp = Rails.configuration.x.email_domains_allowlist
Rails.configuration.x.email_domains_allowlist = 'example.com'
block.call
Rails.configuration.x.email_domains_whitelist = tmp
Rails.configuration.x.email_domains_allowlist = tmp
end
it 'does not add errors if there are no DNS records' do
@ -69,7 +69,7 @@ describe EmailMxValidator do
expect(user.errors).to have_received(:add)
end
it 'adds an error if the MX record is blacklisted' do
it 'adds an error if the MX record has an email domain block' do
EmailDomainBlock.create!(domain: 'mail.example.com')
configure_resolver(

View file

@ -2,7 +2,7 @@
require 'rails_helper'
RSpec.describe BlacklistedEmailValidator do
RSpec.describe UserEmailValidator do
describe '#validate' do
subject { described_class.new.validate(user) }