mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +02:00
Return array instead of string
This commit is contained in:
parent
1f70df9348
commit
d646edf85c
2 changed files with 5 additions and 5 deletions
|
@ -13,11 +13,11 @@ module Whois
|
||||||
find_by(name: domain_name.to_s).try(:destroy!)
|
find_by(name: domain_name.to_s).try(:destroy!)
|
||||||
|
|
||||||
create!(name: domain_name, json: { name: domain_name.to_s,
|
create!(name: domain_name, json: { name: domain_name.to_s,
|
||||||
status: 'AtAuction',
|
status: ['AtAuction'],
|
||||||
disclaimer: disclaimer })
|
disclaimer: disclaimer })
|
||||||
elsif domain_name.awaiting_payment? || domain_name.pending_registration?
|
elsif domain_name.awaiting_payment? || domain_name.pending_registration?
|
||||||
find_by(name: domain_name.to_s).update!(json: { name: domain_name.to_s,
|
find_by(name: domain_name.to_s).update!(json: { name: domain_name.to_s,
|
||||||
status: 'PendingRegistration',
|
status: ['PendingRegistration'],
|
||||||
disclaimer: disclaimer })
|
disclaimer: disclaimer })
|
||||||
else
|
else
|
||||||
find_by(name: domain_name.to_s).destroy!
|
find_by(name: domain_name.to_s).destroy!
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Whois::RecordTest < ActiveSupport::TestCase
|
||||||
whois_record = Whois::Record.last
|
whois_record = Whois::Record.last
|
||||||
assert_equal 'some.test', whois_record.name
|
assert_equal 'some.test', whois_record.name
|
||||||
assert_equal ({ 'name' => 'some.test',
|
assert_equal ({ 'name' => 'some.test',
|
||||||
'status' => 'AtAuction',
|
'status' => ['AtAuction'],
|
||||||
'disclaimer' => 'disclaimer' }), whois_record.json
|
'disclaimer' => 'disclaimer' }), whois_record.json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class Whois::RecordTest < ActiveSupport::TestCase
|
||||||
whois_record = Whois::Record.find_by(name: 'some.test')
|
whois_record = Whois::Record.find_by(name: 'some.test')
|
||||||
assert_equal 'some.test', whois_record.name
|
assert_equal 'some.test', whois_record.name
|
||||||
assert_equal ({ 'name' => 'some.test',
|
assert_equal ({ 'name' => 'some.test',
|
||||||
'status' => 'PendingRegistration',
|
'status' => ['PendingRegistration'],
|
||||||
'disclaimer' => 'disclaimer' }), whois_record.json
|
'disclaimer' => 'disclaimer' }), whois_record.json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class Whois::RecordTest < ActiveSupport::TestCase
|
||||||
whois_record = Whois::Record.find_by(name: 'some.test')
|
whois_record = Whois::Record.find_by(name: 'some.test')
|
||||||
assert_equal 'some.test', whois_record.name
|
assert_equal 'some.test', whois_record.name
|
||||||
assert_equal ({ 'name' => 'some.test',
|
assert_equal ({ 'name' => 'some.test',
|
||||||
'status' => 'PendingRegistration',
|
'status' => ['PendingRegistration'],
|
||||||
'disclaimer' => 'disclaimer' }), whois_record.json
|
'disclaimer' => 'disclaimer' }), whois_record.json
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue