This commit is contained in:
Martin Lensment 2015-07-06 12:02:27 +03:00
parent 087ab8cfec
commit fa4a2d2987

View file

@ -345,7 +345,7 @@ describe 'EPP Domain', epp: true do
it 'creates a domain with period in days' do it 'creates a domain with period in days' do
old_balance = @registrar1.balance old_balance = @registrar1.balance
old_activities = @registrar1.cash_account.account_activities.count old_activities = @registrar1.cash_account.account_activities.count
xml = domain_create_xml(period: { value: '365', attrs: { unit: 'd' }}) xml = domain_create_xml(period: { value: '365', attrs: { unit: 'd' } })
response = epp_plain_request(xml) response = epp_plain_request(xml)
response[:msg].should == 'Command completed successfully' response[:msg].should == 'Command completed successfully'
@ -361,7 +361,7 @@ describe 'EPP Domain', epp: true do
it 'creates a domain with longer periods' do it 'creates a domain with longer periods' do
old_balance = @registrar1.balance old_balance = @registrar1.balance
old_activities = @registrar1.cash_account.account_activities.count old_activities = @registrar1.cash_account.account_activities.count
xml = domain_create_xml(period: { value: '2', attrs: { unit: 'y' }}) xml = domain_create_xml(period: { value: '2', attrs: { unit: 'y' } })
response = epp_plain_request(xml) response = epp_plain_request(xml)
response[:msg].should == 'Command completed successfully' response[:msg].should == 'Command completed successfully'
@ -377,7 +377,7 @@ describe 'EPP Domain', epp: true do
it 'creates a domain with longer periods' do it 'creates a domain with longer periods' do
old_balance = @registrar1.balance old_balance = @registrar1.balance
old_activities = @registrar1.cash_account.account_activities.count old_activities = @registrar1.cash_account.account_activities.count
xml = domain_create_xml(period: { value: '36', attrs: { unit: 'm' }}) xml = domain_create_xml(period: { value: '36', attrs: { unit: 'm' } })
response = epp_plain_request(xml) response = epp_plain_request(xml)
response[:msg].should == 'Command completed successfully' response[:msg].should == 'Command completed successfully'
@ -2122,7 +2122,13 @@ describe 'EPP Domain', epp: true do
end end
it 'does not renew a domain if credit balance low' do it 'does not renew a domain if credit balance low' do
f = Fabricate(:pricelist, valid_to: Time.zone.now + 1.day, operation_category: 'renew', duration: '1year', price: 100000) f = Fabricate(:pricelist, {
valid_to: Time.zone.now + 1.day,
operation_category: 'renew',
duration: '1year',
price: 100000
})
old_balance = @registrar1.balance old_balance = @registrar1.balance
old_activities = @registrar1.cash_account.account_activities.count old_activities = @registrar1.cash_account.account_activities.count