From b34c0118a80f3d70eef86dfd710cf75eed88266b Mon Sep 17 00:00:00 2001 From: Alex Sherman Date: Fri, 5 Mar 2021 13:43:10 +0500 Subject: [PATCH] Remove registrant_area tests --- app/models/contact.rb | 10 ++--- config/application.rb | 2 +- config/sidekiq.yml | 1 + .../domains/domain_delete_confirms_test.rb | 42 ------------------- 4 files changed, 7 insertions(+), 48 deletions(-) create mode 100644 config/sidekiq.yml delete mode 100644 test/system/registrant_area/domains/domain_delete_confirms_test.rb diff --git a/app/models/contact.rb b/app/models/contact.rb index 518afb07a2..8385e9639f 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -4,11 +4,11 @@ class Contact < ApplicationRecord include Versions # version/contact_version.rb include EppErrors include UserEvents - include Concerns::Contact::Transferable - include Concerns::Contact::Identical - include Concerns::Contact::Disclosable - include Concerns::Contact::Archivable - include Concerns::EmailVerifable + include ::Concerns::Contact::Transferable + include ::Concerns::Contact::Identical + include ::Concerns::Contact::Disclosable + include ::Concerns::Contact::Archivable + include ::Concerns::EmailVerifable belongs_to :original, class_name: self.name belongs_to :registrar, required: true diff --git a/config/application.rb b/config/application.rb index 89a16412bb..7b69dd2db7 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,7 +17,7 @@ module DomainNameRegistry class Application < Rails::Application config.load_defaults 6.0 - config.autoloader = :classic # Do not use zeitwerk for now + config.autoloader = :classic # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/config/sidekiq.yml b/config/sidekiq.yml new file mode 100644 index 0000000000..0515ae2186 --- /dev/null +++ b/config/sidekiq.yml @@ -0,0 +1 @@ +:concurrency: 1 diff --git a/test/system/registrant_area/domains/domain_delete_confirms_test.rb b/test/system/registrant_area/domains/domain_delete_confirms_test.rb deleted file mode 100644 index 259120b18f..0000000000 --- a/test/system/registrant_area/domains/domain_delete_confirms_test.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'application_system_test_case' - -class DomainDeleteConfirmsTest < ApplicationSystemTestCase - include ActionMailer::TestHelper - setup do - @user = users(:registrant) - sign_in @user - - @domain = domains(:shop) - @domain.registrant_verification_asked!('\n', @user.id) - @domain.pending_delete! - end - - def test_enqueues_approve_job_after_verification - visit registrant_domain_delete_confirm_url(@domain.id, token: @domain.registrant_verification_token) - - click_on 'Confirm domain delete' - - assert_text 'Domain registrant change has successfully received.' - - assert_enqueued_jobs 1, only: DomainDeleteConfirmJob - end - - def test_enqueues_reject_job_after_verification - visit registrant_domain_delete_confirm_url(@domain.id, token: @domain.registrant_verification_token) - - click_on 'Reject domain delete' - - assert_text 'Domain registrant change has been rejected successfully.' - - assert_enqueued_jobs 1, only: DomainDeleteConfirmJob - end - - def test_saves_whodunnit_info_after_verifivation - visit registrant_domain_delete_confirm_url(@domain.id, token: @domain.registrant_verification_token) - token = @domain.registrant_verification_token - click_on 'Confirm domain delete' - assert_text 'Domain registrant change has successfully received.' - - refute RegistrantVerification.find_by(verification_token:token).updator_str.empty? - end -end