Add specs to accept comma as a fraction separator in billing price

#475
This commit is contained in:
Artur Beljajev 2017-04-27 15:26:35 +03:00
parent 7cadf66920
commit 71102bb5e8
2 changed files with 31 additions and 0 deletions

View file

@ -77,6 +77,18 @@ RSpec.describe Billing::Price do
price.validate
expect(price.errors).to_not have_key(:price)
end
it 'accepts period as fraction separator' do
price.price = 1.5
price.validate
expect(price.errors).to_not have_key(:price)
end
it 'accepts comma as fraction separator' do
price.price = '1,5'
price.validate
expect(price.errors).to_not have_key(:price)
end
end
describe 'duration validation', db: false do