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 renew ensures the expiration date is the date from the renew response #8

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

billthompson
Copy link

What / Why

When a domain is renewed, find requests on that domain are not guaranteed to reflect the expiration date. Now, when a domain is renewed, the found domain will have its expiration date updated to be the value of the previously successful extend command response.

Also, lib/enom/domain.rb has a dependency on ActiveSupports present? method. Adding ActiveSupport as a dependency in the gemspec (I'm guessing on the version number here; we could probably go lower but that isn't necessary for our use case).

How to test

Unit tests were updated to ensure the returned domain has an expiration date that is greater than the original expiration date.

I also tested manually by:

  • Log on to resellertest.enom.com with Login ID resellid, password resellpw. Find a domain to renew. Note this domain name as you'll need to paste the value in the next step.

  • Create a file at _project_root_/console.rb with the contents:

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 = 'store-10000017.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.

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

@billthompson billthompson merged commit e4efcfb 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