Use locale in price spec

#475
This commit is contained in:
Artur Beljajev 2017-04-27 17:11:34 +03:00
parent 9530fd939d
commit 396d095f98

View file

@ -78,14 +78,8 @@ RSpec.describe Billing::Price do
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'
it 'accepts fraction' do
price.price = "1#{I18n.t('number.currency.format.separator')}5"
price.validate
expect(price.errors).to_not have_key(:price)
end