mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Clean up settings after tests
This commit is contained in:
parent
840f1db5c9
commit
7fcab05e51
15 changed files with 74 additions and 22 deletions
|
@ -4,9 +4,14 @@ class APIDomainTransfersTest < ApplicationIntegrationTest
|
|||
setup do
|
||||
@domain = domains(:shop)
|
||||
@new_registrar = registrars(:goodnames)
|
||||
@original_transfer_wait_time = Setting.transfer_wait_time
|
||||
Setting.transfer_wait_time = 0 # Auto-approval
|
||||
end
|
||||
|
||||
teardown do
|
||||
Setting.transfer_wait_time = @original_transfer_wait_time
|
||||
end
|
||||
|
||||
def test_returns_domain_transfers
|
||||
post '/repp/v1/domain_transfers', request_params, { 'HTTP_AUTHORIZATION' => http_auth_key }
|
||||
assert_response 200
|
||||
|
|
|
@ -5,14 +5,14 @@ class RegistrantApiV1ContactUpdateTest < ActionDispatch::IntegrationTest
|
|||
setup do
|
||||
@contact = contacts(:john)
|
||||
|
||||
@original_address_processing_setting = Setting.address_processing
|
||||
@original_address_processing = Setting.address_processing
|
||||
@original_fax_enabled_setting = ENV['fax_enabled']
|
||||
|
||||
@user = users(:registrant)
|
||||
end
|
||||
|
||||
teardown do
|
||||
Setting.address_processing = @original_address_processing_setting
|
||||
Setting.address_processing = @original_address_processing
|
||||
ENV['fax_enabled'] = @original_fax_enabled_setting
|
||||
end
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ class EppDomainDeleteBaseTest < EppTestCase
|
|||
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@original_confirmation_setting = Setting.request_confirmation_on_domain_deletion_enabled
|
||||
@original_domain_delete_confirmation = Setting.request_confirmation_on_domain_deletion_enabled
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
teardown do
|
||||
Setting.request_confirmation_on_domain_deletion_enabled = @original_confirmation_setting
|
||||
Setting.request_confirmation_on_domain_deletion_enabled = @original_domain_delete_confirmation
|
||||
end
|
||||
|
||||
def test_bypasses_domain_and_registrant_and_contacts_validation
|
||||
|
|
|
@ -3,11 +3,18 @@ require 'test_helper'
|
|||
class EppDomainUpdateBaseTest < EppTestCase
|
||||
include ActionMailer::TestHelper
|
||||
|
||||
def setup
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@original_registrant_change_verification =
|
||||
Setting.request_confrimation_on_registrant_change_enabled
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
teardown do
|
||||
Setting.request_confrimation_on_registrant_change_enabled =
|
||||
@original_registrant_change_verification
|
||||
end
|
||||
|
||||
def test_update_domain
|
||||
request_xml = <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
|
|
|
@ -3,6 +3,11 @@ require 'test_helper'
|
|||
class RegistrarAreaIdCardSignInTest < ApplicationIntegrationTest
|
||||
setup do
|
||||
@user = users(:api_bestnames)
|
||||
@original_registrar_area_ip_whitelist = Setting.registrar_ip_whitelist_enabled
|
||||
end
|
||||
|
||||
teardown do
|
||||
Setting.registrar_ip_whitelist_enabled = @original_registrar_area_ip_whitelist
|
||||
end
|
||||
|
||||
def test_signs_in_a_user_when_id_card_owner_is_found
|
||||
|
@ -39,8 +44,6 @@ class RegistrarAreaIdCardSignInTest < ApplicationIntegrationTest
|
|||
|
||||
get registrar_root_path
|
||||
assert_redirected_to new_registrar_user_session_path
|
||||
|
||||
Setting.registrar_ip_whitelist_enabled = false
|
||||
end
|
||||
|
||||
def test_does_not_sign_in_a_user_when_certificate_is_absent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue