Skip to content

Commit

Permalink
Cleanup specs around events_per_page
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Feb 13, 2024
1 parent a2826a3 commit 5a914a5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions spec/features/splashpage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,19 @@
end

it 'only shows 3 events happening now because of pagination' do
event_schedule1 = create(:event_schedule, event: scheduled_event1, schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))
event_schedule2 = create(:event_schedule, event: scheduled_event2, schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))
event_schedule3 = create(:event_schedule, event: scheduled_event3, schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))
event_schedule4 = create(:event_schedule, event: scheduled_event4, schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))
Rails.configuration.conference[:events_per_page] = 3
event_schedule1 = create(:event_schedule, event: scheduled_event1,
schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))
event_schedule2 = create(:event_schedule, event: scheduled_event2,
schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))
event_schedule3 = create(:event_schedule, event: scheduled_event3,
schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))
event_schedule4 = create(:event_schedule, event: scheduled_event4,
schedule: selected_schedule,
start_time: current_time.strftime('%a, %d %b %Y %H:%M:%S'))

visit conference_path(conference2.short_title)
happening_now = page.find('#happening-now')
Expand Down

0 comments on commit 5a914a5

Please sign in to comment.