Make factories and tests timezone-friendly
This commit is contained in:
parent
4bc783b42c
commit
297447d802
6 changed files with 9 additions and 9 deletions
|
|
@ -16,7 +16,7 @@ feature Conference do
|
|||
|
||||
select('(GMT+01:00) Berlin', from: 'conference[timezone]')
|
||||
|
||||
today = Date.today - 1
|
||||
today = Time.zone.today - 1
|
||||
page
|
||||
.execute_script("$('#conference-start-datepicker').val('" +
|
||||
"#{today.strftime('%d/%m/%Y')}')")
|
||||
|
|
@ -53,7 +53,7 @@ feature Conference do
|
|||
fill_in 'conference_title', with: 'New Con'
|
||||
fill_in 'conference_short_title', with: 'NewCon'
|
||||
|
||||
day = Date.today + 10
|
||||
day = Time.zone.today + 10
|
||||
page
|
||||
.execute_script("$('#conference-start-datepicker').val('" +
|
||||
"#{day.strftime('%d/%m/%Y')}')")
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in cfp', feature: true, versioning: true, js: true do
|
||||
cfp = create(:cfp, program: conference.program)
|
||||
cfp.update_attributes(start_date: (Date.today + 1).strftime('%d/%m/%Y'), end_date: (Date.today + 3).strftime('%d/%m/%Y'))
|
||||
cfp.update_attributes(start_date: (Time.zone.today + 1).strftime('%d/%m/%Y'), end_date: (Time.zone.today + 3).strftime('%d/%m/%Y'))
|
||||
cfp_id = cfp.id
|
||||
cfp.destroy
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in registration_period', feature: true, versioning: true, js: true do
|
||||
registration_period = create(:registration_period, conference: conference)
|
||||
registration_period.update_attributes(start_date: (Date.today + 1).strftime('%d/%m/%Y'), end_date: (Date.today + 3).strftime('%d/%m/%Y'))
|
||||
registration_period.update_attributes(start_date: (Time.zone.today + 1).strftime('%d/%m/%Y'), end_date: (Time.zone.today + 3).strftime('%d/%m/%Y'))
|
||||
registration_period_id = registration_period.id
|
||||
registration_period.destroy
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue