From ecd49cb1e73881187d517a412b31a7af30e2d4da Mon Sep 17 00:00:00 2001 From: Miha Mencin Date: Wed, 18 Mar 2020 09:57:57 +0100 Subject: [PATCH] fix format and export_format mess --- app/models/repository_date_time_value.rb | 4 ++++ spec/models/repository_date_time_value_spec.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/repository_date_time_value.rb b/app/models/repository_date_time_value.rb index 66810818f..dbacffe8f 100644 --- a/app/models/repository_date_time_value.rb +++ b/app/models/repository_date_time_value.rb @@ -9,6 +9,10 @@ class RepositoryDateTimeValue < RepositoryDateTimeValueBase end def formatted + super(:full_with_comma) + end + + def export_formatted I18n.l(data, format: :full ) end diff --git a/spec/models/repository_date_time_value_spec.rb b/spec/models/repository_date_time_value_spec.rb index d5a6ee738..d44826287 100644 --- a/spec/models/repository_date_time_value_spec.rb +++ b/spec/models/repository_date_time_value_spec.rb @@ -9,7 +9,7 @@ describe RepositoryDateTimeValue, type: :model do describe '.formatted' do it 'prints date format with date' do - str = '10/11/2000 01:04' + str = '10/11/2000, 01:04' expect(date_time_value.formatted).to eq(str) end end