mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Add a test to domain renew
This commit is contained in:
parent
8baa2e12c9
commit
a3abfa73e5
5 changed files with 29 additions and 6 deletions
|
@ -32,6 +32,7 @@ module Epp::DomainsHelper
|
|||
end
|
||||
|
||||
def renew_domain
|
||||
# TODO support period unit
|
||||
@domain = find_domain
|
||||
|
||||
handle_errors(@domain) and return unless @domain
|
||||
|
@ -49,11 +50,11 @@ module Epp::DomainsHelper
|
|||
end
|
||||
|
||||
def find_domain
|
||||
@domain = Domain.find_by(name: @ph[:name])
|
||||
unless @domain
|
||||
domain = Domain.find_by(name: @ph[:name])
|
||||
unless domain
|
||||
epp_errors << {code: '2303', msg: I18n.t('errors.messages.epp_domain_not_found'), value: {obj: 'name', val: @ph[:name]}}
|
||||
end
|
||||
@domain
|
||||
domain
|
||||
end
|
||||
|
||||
def domain_create_params(ph)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue