mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Merge pull request #2193 from internetee/2191-disputed-domains-are-missing-from-whois
remove active disputed domains from retruned method
This commit is contained in:
commit
eba3facc58
3 changed files with 4 additions and 5 deletions
|
@ -27,13 +27,13 @@ module Whois
|
|||
when 'reserved' then ReservedDomain
|
||||
when 'blocked' then BlockedDomain
|
||||
when 'domain' then Domain
|
||||
when 'disputed' then Dispute.active
|
||||
when 'disputed' then Dispute
|
||||
else DNS::Zone
|
||||
end
|
||||
end
|
||||
|
||||
def find_record(collection, name)
|
||||
if collection == Dispute.active
|
||||
if collection == Dispute
|
||||
collection.find_by(domain_name: name)
|
||||
else
|
||||
collection == DNS::Zone ? collection.find_by(origin: name) : collection.find_by(name: name)
|
||||
|
|
|
@ -37,8 +37,7 @@ namespace :whois do
|
|||
end
|
||||
|
||||
print "\n-----> Update disputed domains whois_records"
|
||||
Dispute.active.find_in_batches.each do |group|
|
||||
|
||||
Dispute.find_in_batches.each do |group|
|
||||
UpdateWhoisRecordJob.perform_later group.map(&:domain_name), 'disputed'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue