mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 16:39:55 +02:00
Add period unit support to domain price method #2741
This commit is contained in:
parent
98439b896c
commit
61dfe6e1f3
2 changed files with 26 additions and 1 deletions
|
@ -182,6 +182,26 @@ describe Domain do
|
|||
@domain.force_delete_at.should be_nil
|
||||
end
|
||||
|
||||
it 'should know its price' do
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'create',
|
||||
duration: '1year',
|
||||
price: 1.50,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: nil
|
||||
})
|
||||
|
||||
domain = Fabricate(:domain)
|
||||
domain.price('create').should == 1.50
|
||||
|
||||
domain = Fabricate(:domain, period: 12, period_unit: 'm')
|
||||
domain.price('create').should == 1.50
|
||||
|
||||
domain = Fabricate(:domain, period: 365, period_unit: 'd')
|
||||
domain.price('create').should == 1.50
|
||||
end
|
||||
|
||||
context 'about registrant update confirm' do
|
||||
before :all do
|
||||
@domain.registrant_verification_token = 123
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue