Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UK-specific excluded calculated homepage domains #1789

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/model_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,23 @@ def late_calculator
prepend ProAccountBans::ModelMethods
end

PublicBody.excluded_calculated_home_page_domains += %w[
aol.co.uk
blueyonder.co.uk
btconnect.com
btinternet.com
btopenworld.com
hotmail.co.uk
live.co.uk
ntlworld.com
sky.com
talk21.com
talktalk.net
tiscali.co.uk
virginmedia.com
yahoo.co.uk
]

PublicBody.class_eval do
# Return the domain part of an email address, canonicalised and with common
# extra UK Government server name parts removed.
Expand Down
15 changes: 15 additions & 0 deletions spec/public_body_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require_relative 'spec_helper'

RSpec.describe PublicBody do
describe '.excluded_calculated_home_page_domains' do
subject { described_class.excluded_calculated_home_page_domains }

it 'includes default global domains' do
is_expected.to include('aol.com')
end

it 'includes expected localise domains' do
is_expected.to include('aol.co.uk')
end
end
end
Loading