Merge pull request #1609 from internetee/1604-updating-whois-after-contact-update

Fix not running whois update after contact update
This commit is contained in:
Timo Võhmar 2020-06-12 13:42:54 +03:00 committed by GitHub
commit 5e492afdba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View file

@ -248,6 +248,15 @@ class ContactTest < ActiveSupport::TestCase
assert_equal %w[ok], contact.statuses
end
def test_whois_gets_updated_after_contact_save
@contact.name = 'SomeReallyWeirdRandomTestName'
domain = @contact.registrant_domains.first
@contact.save!
assert_equal domain.whois_record.try(:json).try(:[], 'registrant'), @contact.name
end
private
def make_contact_free_of_domains_where_it_acts_as_a_registrant(contact)