Make factories and tests timezone-friendly

This commit is contained in:
Michael Klimenko 2018-03-23 17:13:57 +05:00 committed by James Mason
parent 4bc783b42c
commit 297447d802
6 changed files with 9 additions and 9 deletions

View file

@ -41,7 +41,7 @@ describe Admin::ConferencesController do
mailer = double
allow(mailer).to receive(:deliver)
conference.email_settings = create(:email_settings)
patch :update, id: conference.short_title, conference: attributes_for(:conference, start_date: Date.today + 2.days, end_date: Date.today + 4.days)
patch :update, id: conference.short_title, conference: attributes_for(:conference, start_date: Time.zone.today + 2.days, end_date: Time.zone.today + 4.days)
conference.reload
allow(Mailbot).to receive(:conference_date_update_mail).and_return(mailer)
end