From f1a4c790690695b9f78d093affcf13015aa5a3ea Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Tue, 12 Oct 2021 14:55:25 +0300 Subject: [PATCH] fixed name error --- app/interactions/whois/update.rb | 2 +- test/jobs/update_whois_record_job_test.rb | 2 +- .../registrar_area/bulk_change/nameserver_test.rb | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/interactions/whois/update.rb b/app/interactions/whois/update.rb index 7b84a46a6..6bd2f4abc 100644 --- a/app/interactions/whois/update.rb +++ b/app/interactions/whois/update.rb @@ -13,7 +13,7 @@ module Whois Array(names).each do |name| record = find_record(collection, name) if record - Whois::UpdateRecord.run(record: { klass: collection.to_s, id: record.id, type: type }) + Whois::UpdateRecord.run(record: { klass: record.class.to_s, id: record.id, type: type }) else Whois::DeleteRecord.run(name: name, type: type) end diff --git a/test/jobs/update_whois_record_job_test.rb b/test/jobs/update_whois_record_job_test.rb index 77bc7bb23..5eb589bf3 100644 --- a/test/jobs/update_whois_record_job_test.rb +++ b/test/jobs/update_whois_record_job_test.rb @@ -16,7 +16,7 @@ class SendEInvoiceJobTest < ActiveJob::TestCase domain_names = ReservedDomain.find_in_batches.first.map(&:name) assert_domains_processed_by_task(domain_names, 'reserved') end - + private def assert_domains_processed_by_task(domain_names, type) diff --git a/test/system/registrar_area/bulk_change/nameserver_test.rb b/test/system/registrar_area/bulk_change/nameserver_test.rb index b6aa37e59..c4416f649 100644 --- a/test/system/registrar_area/bulk_change/nameserver_test.rb +++ b/test/system/registrar_area/bulk_change/nameserver_test.rb @@ -28,7 +28,7 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase click_link 'Bulk change' click_link 'Nameserver' - fill_in 'Old hostname', with: 'ns1.bestnames.test' + fill_in 'Old hostname (optional)', with: 'ns1.bestnames.test' fill_in 'New hostname', with: 'new-ns.bestnames.test' fill_in 'ipv4', with: "192.0.2.55\n192.0.2.56" fill_in 'ipv6', with: "2001:db8::55\n2001:db8::56" @@ -49,14 +49,14 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase click_link 'Bulk change' click_link 'Nameserver' - fill_in 'Old hostname', with: 'old hostname' + fill_in 'Old hostname (optional)', with: 'old hostname' fill_in 'New hostname', with: 'new hostname' fill_in 'ipv4', with: 'ipv4' fill_in 'ipv6', with: 'ipv6' click_on 'Replace/Add nameserver' assert_text 'epic fail' - assert_field 'Old hostname', with: 'old hostname' + assert_field 'Old hostname (optional)', with: 'old hostname' assert_field 'New hostname', with: 'new hostname' assert_field 'ipv4', with: 'ipv4' assert_field 'ipv6', with: 'ipv6' @@ -82,7 +82,7 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase click_link 'Bulk change' click_link 'Nameserver' - fill_in 'Old hostname', with: 'ns1.bestnames.test' + fill_in 'Old hostname (optional)', with: 'ns1.bestnames.test' fill_in 'New hostname', with: 'new-ns.bestnames.test' fill_in 'ipv4', with: "192.0.2.55\n192.0.2.56" fill_in 'ipv6', with: "2001:db8::55\n2001:db8::56" @@ -103,7 +103,7 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase click_link 'Bulk change' click_link 'Nameserver' - fill_in 'Old hostname', with: nameserver.hostname + fill_in 'Old hostname (optional)', with: nameserver.hostname fill_in 'New hostname', with: 'new-ns.bestnames.test' fill_in 'ipv4', with: "192.0.2.55\n192.0.2.56" fill_in 'ipv6', with: "2001:db8::55\n2001:db8::56"