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
|
module EtablissementHelper
|
||||||
def pretty_currency(capital_social, unit: '€')
|
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
|
end
|
||||||
|
|
||||||
def pretty_currency_unit(unit)
|
def pretty_currency_unit(unit)
|
||||||
|
|
|
@ -49,13 +49,13 @@ RSpec.describe EtablissementHelper, type: :helper do
|
||||||
describe '#pretty_currency' do
|
describe '#pretty_currency' do
|
||||||
subject { pretty_currency(etablissement.entreprise_capital_social) }
|
subject { pretty_currency(etablissement.entreprise_capital_social) }
|
||||||
|
|
||||||
it { is_expected.to eq('123 000,00 €') }
|
it { is_expected.to eq('123 000 €') }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#pretty_currency with special unit' do
|
describe '#pretty_currency with special unit' do
|
||||||
subject { pretty_currency(12345, unit: 'k€') }
|
subject { pretty_currency(12345, unit: 'k€') }
|
||||||
|
|
||||||
it { is_expected.to eq('12 345,00 k€') }
|
it { is_expected.to eq('12 345 k€') }
|
||||||
end
|
end
|
||||||
describe '#pretty_date_exercice' do
|
describe '#pretty_date_exercice' do
|
||||||
subject { pretty_date_exercice("201908") }
|
subject { pretty_date_exercice("201908") }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue