[test]Use scenario instead of it
This commit is contained in:
parent
35f216778b
commit
6d9b679cef
1 changed files with 5 additions and 5 deletions
|
|
@ -108,13 +108,13 @@ feature Splashpage do
|
|||
sign_in participant
|
||||
end
|
||||
|
||||
it 'displays \'There are no events happening now and next.\' if nothing is happening now and next' do
|
||||
scenario 'displays \'There are no events happening now and next.\' if nothing is happening now and next' do
|
||||
visit conference_path(conference2.short_title)
|
||||
happening_now = page.find('#happening-now')
|
||||
expect(happening_now).to have_content('There are no events happening now and next.')
|
||||
end
|
||||
|
||||
it 'shows all events happening next if nothing is happening now' do
|
||||
scenario 'shows all events happening next if nothing is happening now' do
|
||||
event_schedule1 = create(:event_schedule, event: scheduled_event1, schedule: selected_schedule, start_time: (Time.now.in_time_zone(conference2.timezone) + 1.hour).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
event_schedule2 = create(:event_schedule, event: scheduled_event2, schedule: selected_schedule, start_time: (Time.now.in_time_zone(conference2.timezone) + 1.hour).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
visit conference_path(conference2.short_title)
|
||||
|
|
@ -123,7 +123,7 @@ feature Splashpage do
|
|||
expect(happening_now).to have_content(event_schedule2.event.title)
|
||||
end
|
||||
|
||||
it 'only shows all events happening now if something is happening now and next' do
|
||||
scenario 'only shows all events happening now if something is happening now and next' do
|
||||
event_schedule1 = create(:event_schedule, event: scheduled_event1, schedule: selected_schedule, start_time: (Time.now.in_time_zone(conference2.timezone) + 1.hour).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
event_schedule2 = create(:event_schedule, event: scheduled_event2, schedule: selected_schedule, start_time: (Time.now.in_time_zone(conference2.timezone) + 1.hour).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
event_schedule3 = create(:event_schedule, event: scheduled_event3, schedule: selected_schedule, start_time: Time.now.in_time_zone(conference2.timezone).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
|
|
@ -134,7 +134,7 @@ feature Splashpage do
|
|||
expect(happening_now).not_to have_content(event_schedule2.event.title)
|
||||
end
|
||||
|
||||
it 'only shows events happening at the earliest time, not at a later time in the future' do
|
||||
scenario 'only shows events happening at the earliest time, not at a later time in the future' do
|
||||
event_schedule1 = create(:event_schedule, event: scheduled_event1, schedule: selected_schedule, start_time: (Time.now.in_time_zone(conference2.timezone) + 1.hour).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
event_schedule2 = create(:event_schedule, event: scheduled_event2, schedule: selected_schedule, start_time: (Time.now.in_time_zone(conference2.timezone) + 1.hour).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
event_schedule3 = create(:event_schedule, event: scheduled_event3, schedule: selected_schedule, start_time: (Time.now.in_time_zone(conference2.timezone) + 2.hours).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
|
|
@ -145,7 +145,7 @@ feature Splashpage do
|
|||
expect(happening_now).not_to have_content(event_schedule3.event.title)
|
||||
end
|
||||
|
||||
it 'only shows 3 events happening now because of pagination' do
|
||||
scenario 'only shows 3 events happening now because of pagination' do
|
||||
event_schedule1 = create(:event_schedule, event: scheduled_event1, schedule: selected_schedule, start_time: Time.now.in_time_zone(conference2.timezone).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
event_schedule2 = create(:event_schedule, event: scheduled_event2, schedule: selected_schedule, start_time: Time.now.in_time_zone(conference2.timezone).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
event_schedule3 = create(:event_schedule, event: scheduled_event3, schedule: selected_schedule, start_time: Time.now.in_time_zone(conference2.timezone).strftime('%a, %d %b %Y %H:%M:%S'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue