From 2fd88e3a17d0bba86d245996b66d907d91c2eb3a Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Tue, 9 Jun 2020 17:06:08 +0200 Subject: [PATCH] =?UTF-8?q?affiche=20uniquement=20l'ann=C3=A9e=20pour=20le?= =?UTF-8?q?s=20bilans?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/etablissement_helper.rb | 2 +- spec/helpers/etablissement_helper_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/etablissement_helper.rb b/app/helpers/etablissement_helper.rb index 33eb337c2..15128ce0d 100644 --- a/app/helpers/etablissement_helper.rb +++ b/app/helpers/etablissement_helper.rb @@ -40,6 +40,6 @@ module EtablissementHelper end def pretty_date_exercice(date) - date.sub(/(?\d{4})(?\d{2})/, '\k/\k') if date.present? + date.sub(/(?\d{4})(?\d{2})/, '\k') if date.present? end end diff --git a/spec/helpers/etablissement_helper_spec.rb b/spec/helpers/etablissement_helper_spec.rb index d05e9c305..94632791e 100644 --- a/spec/helpers/etablissement_helper_spec.rb +++ b/spec/helpers/etablissement_helper_spec.rb @@ -59,6 +59,6 @@ RSpec.describe EtablissementHelper, type: :helper do end describe '#pretty_date_exercice' do subject { pretty_date_exercice("201908") } - it { is_expected.to eq("08/2019") } + it { is_expected.to eq("2019") } end end