From aff93ecd6a52abcd8d5f326273e0c9b75fe8531f Mon Sep 17 00:00:00 2001 From: Frederic Merizen Date: Fri, 26 Oct 2018 16:14:34 +0200 Subject: [PATCH] Simplify test syntax --- spec/models/procedure_presentation_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/procedure_presentation_spec.rb b/spec/models/procedure_presentation_spec.rb index ec69ba20a..f62afab48 100644 --- a/spec/models/procedure_presentation_spec.rb +++ b/spec/models/procedure_presentation_spec.rb @@ -135,14 +135,14 @@ describe ProcedurePresentation do let(:column) { 'created_at' } let(:dossier) { Timecop.freeze(Time.zone.local(1992, 3, 22)) { create(:dossier, procedure: procedure) } } - it { is_expected.to eq(Time.zone.local(1992, 3, 22).strftime('%d/%m/%Y')) } + it { is_expected.to eq('22/03/1992') } end context 'for en_construction_at column' do let(:column) { 'en_construction_at' } let(:dossier) { create(:dossier, :en_construction, procedure: procedure, en_construction_at: Time.zone.local(2018, 10, 17)) } - it { is_expected.to eq(Time.zone.local(2018, 10, 17).strftime('%d/%m/%Y')) } + it { is_expected.to eq('17/10/2018') } end context 'for updated_at column' do @@ -151,7 +151,7 @@ describe ProcedurePresentation do before { dossier.touch(time: Time.zone.local(2018, 9, 25)) } - it { is_expected.to eq(Time.zone.local(2018, 9, 25).strftime('%d/%m/%Y')) } + it { is_expected.to eq('25/09/2018') } end end