From 5a914a5fe2abc26b80ef1cc36fb605a1ed6ad075 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 12 Feb 2024 23:45:34 -0800 Subject: [PATCH] Cleanup specs around events_per_page --- spec/features/splashpage_spec.rb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/spec/features/splashpage_spec.rb b/spec/features/splashpage_spec.rb index d0ded3917..ed8ce86bf 100644 --- a/spec/features/splashpage_spec.rb +++ b/spec/features/splashpage_spec.rb @@ -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')