mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Improve bulk renew tests
This commit is contained in:
parent
66114aa648
commit
04944b8ac4
6 changed files with 62 additions and 35 deletions
|
@ -30,16 +30,6 @@ module Depp
|
|||
['10 years', '10y'],
|
||||
]
|
||||
|
||||
def self.bulk_renew(domains, period, registrar)
|
||||
payload = { domains: domains, renew_period: period }
|
||||
token = Base64.urlsafe_encode64("#{registrar.username}:#{registrar.plain_text_password}")
|
||||
headers = { Authorization: "Basic #{token}" }
|
||||
|
||||
RestClient.post("http://localhost:3000/repp/v1/domains/renew/bulk", payload, headers)
|
||||
rescue RestClient::ExceptionWithResponse => e
|
||||
e.response
|
||||
end
|
||||
|
||||
def initialize(args = {})
|
||||
self.current_user = args[:current_user]
|
||||
self.epp_xml = EppXml::Domain.new(cl_trid_prefix: current_user.tag)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue