mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
fix format and export_format mess
This commit is contained in:
parent
24b979aa6f
commit
ecd49cb1e7
2 changed files with 5 additions and 1 deletions
|
@ -9,6 +9,10 @@ class RepositoryDateTimeValue < RepositoryDateTimeValueBase
|
|||
end
|
||||
|
||||
def formatted
|
||||
super(:full_with_comma)
|
||||
end
|
||||
|
||||
def export_formatted
|
||||
I18n.l(data, format: :full )
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue