Time.local => Time.zone.local
This commit is contained in:
parent
3078b377c7
commit
26ae29ea52
2 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ RSpec.describe CommentaireHelper, type: :helper do
|
|||
end
|
||||
|
||||
describe '.commentaire_date' do
|
||||
let(:present_date) { Time.local(2018, 9, 2, 10, 5, 0) }
|
||||
let(:present_date) { Time.zone.local(2018, 9, 2, 10, 5, 0) }
|
||||
let(:creation_date) { present_date }
|
||||
let(:commentaire) do
|
||||
Timecop.freeze(creation_date) { create(:commentaire, email: "michel@pref.fr") }
|
||||
|
@ -71,7 +71,7 @@ RSpec.describe CommentaireHelper, type: :helper do
|
|||
end
|
||||
|
||||
context 'when formatting the first day of the month' do
|
||||
let(:present_date) { Time.local(2018, 9, 1, 10, 5, 0) }
|
||||
let(:present_date) { Time.zone.local(2018, 9, 1, 10, 5, 0) }
|
||||
it 'includes the ordinal' do
|
||||
expect(subject).to eq 'le 1er septembre à 10 h 05'
|
||||
end
|
||||
|
|
|
@ -4,8 +4,8 @@ describe '2018_03_06_clean_html_textareas#clean' do
|
|||
let(:procedure) { create(:procedure) }
|
||||
let(:type_champ) { create(:type_de_champ_textarea, procedure: procedure) }
|
||||
let(:champ) { type_champ.champ.create(value: "<p>Gnahar<br>greu bouahaha</p>") }
|
||||
let(:champ_date) { Time.local(1995) }
|
||||
let(:rake_date) { Time.local(2018) }
|
||||
let(:champ_date) { Time.zone.local(1995) }
|
||||
let(:rake_date) { Time.zone.local(2018) }
|
||||
let(:rake_task) { Rake::Task['2018_03_06_clean_html_textareas:clean'] }
|
||||
|
||||
before do
|
||||
|
|
Loading…
Add table
Reference in a new issue