Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Rename `request_confrimation_on_registrant_change_enabled` setting to
`verify_registrant_change`

Fixes #371
  • Loading branch information
Artur Beljajev committed Oct 19, 2019
1 parent 227031e commit 2fac5d3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/models/epp/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def update(frame, current_user, verify = true)
same_registrant_as_current = (registrant.code == frame.css('registrant').text)

if !same_registrant_as_current && errors.empty? && verify &&
Setting.request_confrimation_on_registrant_change_enabled &&
Setting.verify_registrant_change &&
frame.css('registrant').present? &&
frame.css('registrant').attr('verified').to_s.downcase != 'yes'
registrant_verification_asked!(frame.to_s, current_user.id)
Expand Down
2 changes: 1 addition & 1 deletion app/models/setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def self.boolean_settings
client_side_status_editing_enabled
registrar_ip_whitelist_enabled
api_ip_whitelist_enabled
request_confrimation_on_registrant_change_enabled
verify_registrant_change
request_confirmation_on_domain_deletion_enabled
nameserver_required
address_processing
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/settings/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
= render 'setting_row', var: :client_side_status_editing_enabled
= render 'setting_row', var: :api_ip_whitelist_enabled
= render 'setting_row', var: :registrar_ip_whitelist_enabled
= render 'setting_row', var: :request_confrimation_on_registrant_change_enabled
= render 'setting_row', var: :verify_registrant_change
= render 'setting_row', var: :request_confirmation_on_domain_deletion_enabled
= render 'setting_row', var: :address_processing

Expand Down
2 changes: 1 addition & 1 deletion config/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defaults: &defaults
ns_max_count: 11

transfer_wait_time: 0
request_confrimation_on_registrant_change_enabled: true
verify_registrant_change: true
request_confirmation_on_domain_deletion_enabled: true
address_processing: true
default_language: en
Expand Down
16 changes: 7 additions & 9 deletions test/integration/epp/domain/update/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ class EppDomainUpdateBaseTest < EppTestCase

setup do
@domain = domains(:shop)
@original_registrant_change_verification =
Setting.request_confrimation_on_registrant_change_enabled
@original_verify_registrant_change = Setting.verify_registrant_change
ActionMailer::Base.deliveries.clear
end

teardown do
Setting.request_confrimation_on_registrant_change_enabled =
@original_registrant_change_verification
Setting.verify_registrant_change = @original_verify_registrant_change
end

def test_update_domain
Expand Down Expand Up @@ -84,7 +82,7 @@ def test_does_not_return_server_delete_prohibited_status_when_pending_update_sta
end

def test_requires_verification_from_current_registrant_when_provided_registrant_is_a_new_one
Setting.request_confrimation_on_registrant_change_enabled = true
Setting.verify_registrant_change = true
new_registrant = contacts(:william).becomes(Registrant)
assert_not_equal new_registrant, @domain.registrant

Expand Down Expand Up @@ -120,7 +118,7 @@ def test_requires_verification_from_current_registrant_when_provided_registrant_
end

def test_requires_verification_from_current_registrant_when_not_yet_verified_by_registrar
Setting.request_confrimation_on_registrant_change_enabled = true
Setting.verify_registrant_change = true
new_registrant = contacts(:william)
assert_not_equal new_registrant, @domain.registrant

Expand Down Expand Up @@ -156,7 +154,7 @@ def test_requires_verification_from_current_registrant_when_not_yet_verified_by_
end

def test_skips_verification_when_provided_registrant_is_the_same_as_current_one
Setting.request_confrimation_on_registrant_change_enabled = true
Setting.verify_registrant_change = true

request_xml = <<-XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Expand Down Expand Up @@ -189,7 +187,7 @@ def test_skips_verification_when_provided_registrant_is_the_same_as_current_one
end

def test_skips_verification_when_disabled
Setting.request_confrimation_on_registrant_change_enabled = false
Setting.verify_registrant_change = false
new_registrant = contacts(:william).becomes(Registrant)
assert_not_equal new_registrant, @domain.registrant

Expand Down Expand Up @@ -225,7 +223,7 @@ def test_skips_verification_when_disabled
end

def test_skips_verification_from_current_registrant_when_already_verified_by_registrar
Setting.request_confrimation_on_registrant_change_enabled = true
Setting.verify_registrant_change = true
new_registrant = contacts(:william).becomes(Registrant)
assert_not_equal new_registrant, @domain.registrant

Expand Down

0 comments on commit 2fac5d3

Please sign in to comment.