Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain update_expired returns the domain's correct expiration date and status #9

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

billthompson
Copy link

@billthompson billthompson commented Feb 17, 2017

What / Why

When a domain that has expired is renewed, find requests on that domain are not guaranteed to reflect the new expiration date and the new domain status. Now, when a domain is renewed, the found domain will have its expiration date advanced the number of years supplied to the UpdateExpiredDomains command and it's status updated to Registered.

How to test

Unit tests were updated to ensure the returned domain's expiration date was advanced and has the correct status.

I also tested manually by:

require_relative 'lib/enom.rb'

Enom::Client.username = 'resellid'
Enom::Client.password = 'resellpw'
Enom::Client.test = true

# TODO: Update this to the domain name in the previous step
@domain_name = '0592lh.com' 

puts "Finding domain..."
@domain = Enom::Domain.find(@domain_name)
p @domain
puts

puts "Renewing domain..."
@renewed_domain = Enom::Domain.renew!(@domain_name)
p @renewed_domain
puts
  1. Drop into a pry console (gem install pry if necessary) and run
$ load './console.rb'

Verify the domain's expiration date after the renew is different than the date in the original find request.

[1] pry(main)> load './console.rb'
Finding domain...
#<Enom::Domain:0x007f9c56f54de0 @name="0592lh.com", @sld="0592lh", @tld="com", @expiration_date=#<Date: 2016-03-03 ((2457451j,0s,0n),+0s,2299161j)>, @nameservers=nil, @registration_status="Expired">

Extending expired domain...
#<Enom::Domain:0x007f9c57b0ed98 @name="0592lh.com", @sld="0592lh", @tld="com", @expiration_date=#<Date: 2017-03-03 ((2457816j,0s,0n),+0s,2299161j)>, @nameservers=nil, @registration_status="Registered">

=> true

Also, after refreshing the domain page in eNom a few times, the new date should be reflected in the eNom A.UI.

@billthompson billthompson self-assigned this Feb 17, 2017
@billthompson billthompson merged commit 5893d6f into bigcommerce-labs:master Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants