mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 01:03:35 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
1a208f2923
2 changed files with 7 additions and 3 deletions
|
@ -19,10 +19,10 @@ describe 'EPP Domain', epp: true do
|
|||
Fabricate(:contact, code: 'FIXED:JURIDICAL_1234', ident_type: 'bic')
|
||||
Fabricate(:reserved_domain)
|
||||
Fabricate(:blocked_domain)
|
||||
Fabricate(:pricelist, valid_to: nil)
|
||||
Fabricate(:pricelist, duration: '2years', price: 20, valid_to: nil)
|
||||
@pricelist_reg_1_year = Fabricate(:pricelist, valid_to: nil)
|
||||
@pricelist_reg_2_year = Fabricate(:pricelist, duration: '2years', price: 20, valid_to: nil)
|
||||
Fabricate(:pricelist, duration: '3years', price: 30, valid_to: nil)
|
||||
Fabricate(:pricelist, operation_category: 'renew', price: 15, valid_to: nil)
|
||||
@pricelist_renew_1_year = Fabricate(:pricelist, operation_category: 'renew', price: 15, valid_to: nil)
|
||||
Fabricate(:pricelist, operation_category: 'renew', duration: '2years', price: 35, valid_to: nil)
|
||||
Fabricate(:pricelist, operation_category: 'renew', duration: '3years', price: 62, valid_to: nil)
|
||||
|
||||
|
@ -396,6 +396,7 @@ describe 'EPP Domain', epp: true do
|
|||
a.description.should == "Create #{Domain.last.name}"
|
||||
a.sum.should == -BigDecimal.new('10.0')
|
||||
a.activity_type = AccountActivity::CREATE
|
||||
a.log_pricelist_id.should == @pricelist_reg_1_year.id
|
||||
end
|
||||
|
||||
it 'creates a domain with longer periods' do
|
||||
|
@ -413,6 +414,7 @@ describe 'EPP Domain', epp: true do
|
|||
a.description.should == "Create #{Domain.last.name}"
|
||||
a.sum.should == -BigDecimal.new('20.0')
|
||||
a.activity_type = AccountActivity::CREATE
|
||||
a.log_pricelist_id.should == @pricelist_reg_2_year.id
|
||||
end
|
||||
|
||||
it 'creates a domain with longer periods' do
|
||||
|
@ -2210,6 +2212,7 @@ describe 'EPP Domain', epp: true do
|
|||
a.description.should == "Renew #{Domain.last.name}"
|
||||
a.sum.should == -BigDecimal.new('15.0')
|
||||
a.activity_type = AccountActivity::RENEW
|
||||
a.log_pricelist_id.should == @pricelist_renew_1_year.id
|
||||
end
|
||||
|
||||
it 'renews a domain with 2 year period' do
|
||||
|
|
|
@ -152,6 +152,7 @@ describe Registrar do
|
|||
a = @registrar.cash_account.account_activities.last
|
||||
a.description.should == 'Add money'
|
||||
a.sum.should == BigDecimal.new('13.32')
|
||||
a.log_pricelist_id.should == nil
|
||||
|
||||
@registrar.debit!({ sum: 10.31, description: 'Remove money' })
|
||||
@registrar.balance.should == BigDecimal.new('3.01')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue