Skip to content

Commit

Permalink
edi_sumrz_bib load_date should use oracle formatted datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed Mar 19, 2020
1 parent b261d1b commit 0032836
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/edi_sumrz_bib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def self.insert(edi_lin)
edi_sumrz_bib.vend_code = edi_lin.pluck(:vend_id)[0].to_s
edi_sumrz_bib.id001 = edi_lin.pluck(:vend_unique_id)[0].to_s
edi_sumrz_bib.edi_ckey = fake_ckey
edi_sumrz_bib.load_date = Time.zone.now
edi_sumrz_bib.load_date = I18n.l(Time.now.getlocal, format: :oracle)
edi_sumrz_bib.active_record = nil
edi_sumrz_bib.save
end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/edi_sumrz_bib_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
edi_sumrz_bib = described_class.find_by(edi_ckey: -1)
expect(edi_sumrz_bib.vend_code).to eq 'AMALIV'
expect(edi_sumrz_bib.id001).to eq 'aal0762919'
expect(edi_sumrz_bib.load_date.strftime('%R')).to eq Time.zone.now.strftime('%R')
expect(edi_sumrz_bib.load_date).to eq Time.now.getlocal.strftime('%Y-%m-%d %H:%M:%S %z')
expect(edi_sumrz_bib.active_record).to eq nil
end
# rubocop:enable RSpec/MultipleExpectations
Expand Down

0 comments on commit 0032836

Please sign in to comment.