mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
parent
5fdc1938af
commit
5a533e09bf
44 changed files with 1027 additions and 375 deletions
67
spec/requests/epp/domain/create/account_balance_spec.rb
Normal file
67
spec/requests/epp/domain/create/account_balance_spec.rb
Normal file
|
@ -0,0 +1,67 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'EPP domain:create', settings: false do
|
||||
let(:request) { post '/epp/command/create', frame: request_xml }
|
||||
let!(:user) { create(:api_user_epp, registrar: registrar) }
|
||||
let!(:contact) { create(:contact, code: 'test') }
|
||||
let!(:zone) { create(:zone, origin: 'test') }
|
||||
let!(:price) { create(:price,
|
||||
duration: '1 year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'create',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'),
|
||||
zone: zone)
|
||||
}
|
||||
let(:request_xml) { <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:registrant>test</domain:registrant>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||
<eis:legalDocument type="pdf">#{valid_legal_document}</eis:legalDocument>
|
||||
</eis:extdata>
|
||||
</extension>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
}
|
||||
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
sign_in_to_epp_area(user: user)
|
||||
end
|
||||
|
||||
context 'when account balance is sufficient' do
|
||||
let!(:registrar) { create(:registrar_with_unlimited_balance) }
|
||||
|
||||
it 'creates domain' do
|
||||
expect { request }.to change { Domain.count }.from(0).to(1)
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(1000)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account balance is not sufficient' do
|
||||
let!(:registrar) { create(:registrar_with_zero_balance) }
|
||||
|
||||
it 'does not create domain' do
|
||||
expect { request }.to_not change { Domain.count }
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(2104)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,28 +1,22 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'EPP domain:create' do
|
||||
subject(:response_xml) { Nokogiri::XML(response.body) }
|
||||
subject(:response_code) { response_xml.xpath('//xmlns:result').first['code'] }
|
||||
subject(:response_description) { response_xml.css('result msg').text }
|
||||
RSpec.describe 'EPP domain:create', settings: false do
|
||||
let(:request) { post '/epp/command/create', frame: request_xml }
|
||||
let!(:registrar) { create(:registrar_with_unlimited_balance) }
|
||||
let!(:user) { create(:api_user_epp, registrar: registrar) }
|
||||
let!(:contact) { create(:contact, code: 'test') }
|
||||
let!(:zone) { create(:zone, origin: 'test') }
|
||||
let!(:price) { create(:price,
|
||||
duration: '1 year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'create',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'),
|
||||
zone: zone)
|
||||
}
|
||||
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
|
||||
registrar = create(:registrar)
|
||||
user = create(:api_user_epp, registrar: registrar)
|
||||
create(:account, registrar: registrar, balance: 1.0)
|
||||
|
||||
create(:contact, code: 'test')
|
||||
|
||||
create(:pricelist,
|
||||
category: 'com',
|
||||
duration: '1year',
|
||||
price: 1.to_money,
|
||||
operation_category: 'create',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010')
|
||||
)
|
||||
|
||||
sign_in_to_epp_area(user: user)
|
||||
end
|
||||
|
||||
|
@ -38,7 +32,7 @@ RSpec.describe 'EPP domain:create' do
|
|||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostAttr>
|
||||
|
@ -47,13 +41,11 @@ RSpec.describe 'EPP domain:create' do
|
|||
</domain:hostAttr>
|
||||
</domain:ns>
|
||||
<domain:registrant>test</domain:registrant>
|
||||
<domain:contact type="admin">test</domain:contact>
|
||||
<domain:contact type="tech">test</domain:contact>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
|
||||
<eis:legalDocument type="pdf">#{valid_legal_document}</eis:legalDocument>
|
||||
</eis:extdata>
|
||||
</extension>
|
||||
</command>
|
||||
|
@ -65,18 +57,13 @@ RSpec.describe 'EPP domain:create' do
|
|||
Setting.ns_min_count = 2
|
||||
end
|
||||
|
||||
it 'returns epp code of 2308' do
|
||||
post '/epp/command/create', frame: request_xml
|
||||
expect(response_code).to eq('2308')
|
||||
it 'does not create domain' do
|
||||
expect { request }.to_not change { Domain.count }
|
||||
end
|
||||
|
||||
it 'returns epp description' do
|
||||
post '/epp/command/create', frame: request_xml
|
||||
|
||||
description = 'Data management policy violation;' \
|
||||
" Nameserver count must be between #{Setting.ns_min_count}-#{Setting.ns_max_count}" \
|
||||
' for active domains [nameservers]'
|
||||
expect(response_description).to eq(description)
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(2308)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -87,16 +74,14 @@ RSpec.describe 'EPP domain:create' do
|
|||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
<domain:registrant>test</domain:registrant>
|
||||
<domain:contact type="admin">test</domain:contact>
|
||||
<domain:contact type="tech">test</domain:contact>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
|
||||
<eis:legalDocument type="pdf">#{valid_legal_document}</eis:legalDocument>
|
||||
</eis:extdata>
|
||||
</extension>
|
||||
</command>
|
||||
|
@ -104,22 +89,21 @@ RSpec.describe 'EPP domain:create' do
|
|||
XML
|
||||
}
|
||||
|
||||
it 'returns epp code of 1000' do
|
||||
post '/epp/command/create', frame: request_xml
|
||||
expect(response_code).to eq('1000'), "Expected EPP code of 1000, got #{response_code} (#{response_description})"
|
||||
end
|
||||
|
||||
it 'creates new domain' do
|
||||
expect { post '/epp/command/create', frame: request_xml }.to change { Domain.count }.from(0).to(1)
|
||||
expect { request }.to change { Domain.count }.from(0).to(1)
|
||||
end
|
||||
|
||||
describe 'new domain' do
|
||||
it 'has status of inactive' do
|
||||
post '/epp/command/create', frame: request_xml
|
||||
domain = Domain.find_by(name: 'test.com')
|
||||
expect(domain.statuses).to include(DomainStatus::INACTIVE)
|
||||
request
|
||||
expect(Domain.first.statuses).to include(DomainStatus::INACTIVE)
|
||||
end
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(1000)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
59
spec/requests/epp/domain/create/period_spec.rb
Normal file
59
spec/requests/epp/domain/create/period_spec.rb
Normal file
|
@ -0,0 +1,59 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'EPP domain:create', settings: false do
|
||||
let(:request) { post '/epp/command/create', frame: request_xml }
|
||||
let!(:user) { create(:api_user_epp, registrar: registrar) }
|
||||
let!(:contact) { create(:contact, code: 'test') }
|
||||
let!(:zone) { create(:zone, origin: 'test') }
|
||||
let!(:registrar) { create(:registrar_with_unlimited_balance) }
|
||||
let!(:price) { create(:price,
|
||||
duration: '1 year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'create',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'),
|
||||
zone: zone)
|
||||
}
|
||||
let(:request_xml) { <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:registrant>test</domain:registrant>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||
<eis:legalDocument type="pdf">#{valid_legal_document}</eis:legalDocument>
|
||||
</eis:extdata>
|
||||
</extension>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
}
|
||||
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010 10:30')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
sign_in_to_epp_area(user: user)
|
||||
end
|
||||
|
||||
context 'when period is absent' do
|
||||
it 'creates domain' do
|
||||
expect { request }.to change { Domain.count }.from(0).to(1)
|
||||
end
|
||||
|
||||
it 'uses default duration of 1 year' do
|
||||
request
|
||||
valid_to = (Time.zone.parse('05.07.2010') + 1.year + 1.day).beginning_of_day
|
||||
expect(Domain.first.valid_to).to eq(valid_to)
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(1000)
|
||||
end
|
||||
end
|
||||
end
|
66
spec/requests/epp/domain/create/price_spec.rb
Normal file
66
spec/requests/epp/domain/create/price_spec.rb
Normal file
|
@ -0,0 +1,66 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'EPP domain:create', settings: false do
|
||||
let(:request) { post '/epp/command/create', frame: request_xml }
|
||||
let!(:user) { create(:api_user_epp, registrar: registrar) }
|
||||
let!(:contact) { create(:contact, code: 'test') }
|
||||
let!(:zone) { create(:zone, origin: 'test') }
|
||||
let!(:registrar) { create(:registrar_with_unlimited_balance) }
|
||||
let(:request_xml) { <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
<domain:registrant>test</domain:registrant>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||
<eis:legalDocument type="pdf">#{valid_legal_document}</eis:legalDocument>
|
||||
</eis:extdata>
|
||||
</extension>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
}
|
||||
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
Setting.days_to_renew_domain_before_expire = 0
|
||||
sign_in_to_epp_area(user: user)
|
||||
end
|
||||
|
||||
context 'when price is present' do
|
||||
let!(:price) { create(:price,
|
||||
duration: '1 year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'create',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'),
|
||||
zone: zone)
|
||||
}
|
||||
|
||||
it 'creates domain' do
|
||||
expect { request }.to change { Domain.count }.from(0).to(1)
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(1000)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when price is absent' do
|
||||
it 'does not create domain' do
|
||||
expect { request }.to_not change { Domain.count }
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(2104)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,28 +1,22 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'EPP domain:create' do
|
||||
subject(:response_xml) { Nokogiri::XML(response.body) }
|
||||
subject(:response_code) { response_xml.xpath('//xmlns:result').first['code'] }
|
||||
subject(:response_description) { response_xml.css('result msg').text }
|
||||
RSpec.describe 'EPP domain:create', settings: false do
|
||||
let(:request) { post '/epp/command/create', frame: request_xml }
|
||||
let!(:registrar) { create(:registrar_with_unlimited_balance) }
|
||||
let!(:user) { create(:api_user_epp, registrar: registrar) }
|
||||
let!(:contact) { create(:contact, code: 'test') }
|
||||
let!(:zone) { create(:zone, origin: 'test') }
|
||||
let!(:price) { create(:price,
|
||||
duration: '1 year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'create',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'),
|
||||
zone: zone)
|
||||
}
|
||||
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
|
||||
registrar = create(:registrar)
|
||||
user = create(:api_user_epp, registrar: registrar)
|
||||
create(:account, registrar: registrar, balance: 1.0)
|
||||
|
||||
create(:contact, code: 'test')
|
||||
|
||||
create(:pricelist,
|
||||
category: 'com',
|
||||
duration: '1year',
|
||||
price: 1.to_money,
|
||||
operation_category: 'create',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010')
|
||||
)
|
||||
|
||||
sign_in_to_epp_area(user: user)
|
||||
end
|
||||
|
||||
|
@ -39,7 +33,7 @@ RSpec.describe 'EPP domain:create' do
|
|||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostAttr>
|
||||
|
@ -48,13 +42,11 @@ RSpec.describe 'EPP domain:create' do
|
|||
</domain:hostAttr>
|
||||
</domain:ns>
|
||||
<domain:registrant>test</domain:registrant>
|
||||
<domain:contact type="admin">test</domain:contact>
|
||||
<domain:contact type="tech">test</domain:contact>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
|
||||
<eis:legalDocument type="pdf">#{valid_legal_document}</eis:legalDocument>
|
||||
</eis:extdata>
|
||||
</extension>
|
||||
</command>
|
||||
|
@ -62,9 +54,13 @@ RSpec.describe 'EPP domain:create' do
|
|||
XML
|
||||
}
|
||||
|
||||
it 'returns epp code of 1000' do
|
||||
post '/epp/command/create', frame: request_xml
|
||||
expect(response_code).to eq('1000'), "Expected EPP code of 1000, got #{response_code} (#{response_description})"
|
||||
it 'creates new domain' do
|
||||
expect { request }.to change { Domain.count }.from(0).to(1)
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(1000)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -75,16 +71,14 @@ RSpec.describe 'EPP domain:create' do
|
|||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
<domain:registrant>test</domain:registrant>
|
||||
<domain:contact type="admin">test</domain:contact>
|
||||
<domain:contact type="tech">test</domain:contact>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||
<eis:legalDocument type="pdf">#{Base64.encode64('a' * 5000)}</eis:legalDocument>
|
||||
<eis:legalDocument type="pdf">#{valid_legal_document}</eis:legalDocument>
|
||||
</eis:extdata>
|
||||
</extension>
|
||||
</command>
|
||||
|
@ -92,9 +86,13 @@ RSpec.describe 'EPP domain:create' do
|
|||
XML
|
||||
}
|
||||
|
||||
it 'returns epp code of 2003' do
|
||||
post '/epp/command/create', frame: request_xml
|
||||
expect(response_code).to eq('2003')
|
||||
it 'does not create domain' do
|
||||
expect { request }.to_not change { Domain.count }
|
||||
end
|
||||
|
||||
specify do
|
||||
request
|
||||
expect(response).to have_code_of(2003)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,13 +3,14 @@ require 'rails_helper'
|
|||
RSpec.describe 'EPP domain:renew' do
|
||||
let(:request) { post '/epp/command/renew', frame: request_xml }
|
||||
let!(:user) { create(:api_user_epp, registrar: registrar) }
|
||||
let!(:pricelist) { create(:pricelist,
|
||||
category: 'com',
|
||||
duration: '1year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'renew',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'))
|
||||
let!(:zone) { create(:zone, origin: 'test') }
|
||||
let!(:price) { create(:price,
|
||||
duration: '1 year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'renew',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'),
|
||||
zone: zone)
|
||||
}
|
||||
|
||||
before :example do
|
||||
|
@ -22,7 +23,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
let!(:registrar) { create(:registrar_with_unlimited_balance) }
|
||||
let!(:domain) { create(:domain,
|
||||
registrar: registrar,
|
||||
name: 'test.com',
|
||||
name: 'test.test',
|
||||
expire_time: Time.zone.parse('05.07.2010'))
|
||||
}
|
||||
let(:request_xml) { <<-XML
|
||||
|
@ -31,7 +32,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
<command>
|
||||
<renew>
|
||||
<domain:renew xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:curExpDate>2010-07-05</domain:curExpDate>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
</domain:renew>
|
||||
|
@ -57,7 +58,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
let!(:registrar) { create(:registrar_with_zero_balance) }
|
||||
let!(:domain) { create(:domain,
|
||||
registrar: registrar,
|
||||
name: 'test.com',
|
||||
name: 'test.test',
|
||||
expire_time: Time.zone.parse('05.07.2010'))
|
||||
}
|
||||
let(:request_xml) { <<-XML
|
||||
|
@ -66,7 +67,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
<command>
|
||||
<renew>
|
||||
<domain:renew xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:curExpDate>2010-07-04</domain:curExpDate>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
</domain:renew>
|
||||
|
|
|
@ -4,13 +4,14 @@ RSpec.describe 'EPP domain:renew' do
|
|||
let(:request) { post '/epp/command/renew', frame: request_xml }
|
||||
let!(:user) { create(:api_user_epp, registrar: registrar) }
|
||||
let!(:registrar) { create(:registrar_with_unlimited_balance) }
|
||||
let!(:pricelist) { create(:pricelist,
|
||||
category: 'com',
|
||||
duration: '1year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'renew',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'))
|
||||
let!(:zone) { create(:zone, origin: 'test') }
|
||||
let!(:price) { create(:price,
|
||||
duration: '1 year',
|
||||
price: Money.from_amount(1),
|
||||
operation_category: 'renew',
|
||||
valid_from: Time.zone.parse('05.07.2010'),
|
||||
valid_to: Time.zone.parse('05.07.2010'),
|
||||
zone: zone)
|
||||
}
|
||||
|
||||
before :example do
|
||||
|
@ -22,7 +23,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
context 'when given expire time and current match' do
|
||||
let!(:domain) { create(:domain,
|
||||
registrar: registrar,
|
||||
name: 'test.com',
|
||||
name: 'test.test',
|
||||
expire_time: Time.zone.parse('05.07.2010'))
|
||||
}
|
||||
let(:request_xml) { <<-XML
|
||||
|
@ -31,7 +32,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
<command>
|
||||
<renew>
|
||||
<domain:renew xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:curExpDate>2010-07-05</domain:curExpDate>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
</domain:renew>
|
||||
|
@ -56,7 +57,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
context 'when given expire time and current do not match' do
|
||||
let!(:domain) { create(:domain,
|
||||
registrar: registrar,
|
||||
name: 'test.com',
|
||||
name: 'test.test',
|
||||
expire_time: Time.zone.parse('05.07.2010'))
|
||||
}
|
||||
let(:request_xml) { <<-XML
|
||||
|
@ -65,7 +66,7 @@ RSpec.describe 'EPP domain:renew' do
|
|||
<command>
|
||||
<renew>
|
||||
<domain:renew xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>test.com</domain:name>
|
||||
<domain:name>test.test</domain:name>
|
||||
<domain:curExpDate>2010-07-04</domain:curExpDate>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
</domain:renew>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue