remove precision for currency
This commit is contained in:
parent
eaf832c75c
commit
cce1435faf
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
module EtablissementHelper
|
||||
def pretty_currency(capital_social, unit: '€')
|
||||
number_to_currency(capital_social, locale: :fr, unit: unit)
|
||||
number_to_currency(capital_social, locale: :fr, unit: unit, precision: 0)
|
||||
end
|
||||
|
||||
def pretty_currency_unit(unit)
|
||||
|
|
|
@ -49,13 +49,13 @@ RSpec.describe EtablissementHelper, type: :helper do
|
|||
describe '#pretty_currency' do
|
||||
subject { pretty_currency(etablissement.entreprise_capital_social) }
|
||||
|
||||
it { is_expected.to eq('123 000,00 €') }
|
||||
it { is_expected.to eq('123 000 €') }
|
||||
end
|
||||
|
||||
describe '#pretty_currency with special unit' do
|
||||
subject { pretty_currency(12345, unit: 'k€') }
|
||||
|
||||
it { is_expected.to eq('12 345,00 k€') }
|
||||
it { is_expected.to eq('12 345 k€') }
|
||||
end
|
||||
describe '#pretty_date_exercice' do
|
||||
subject { pretty_date_exercice("201908") }
|
||||
|
|
Loading…
Reference in a new issue