From 38bac34583bae0780003a7c95554edc96848a8d9 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Fri, 30 Apr 2021 16:20:49 +0800 Subject: [PATCH] [fix]Fix route helpers in tests --- spec/services/full_calendar_formatter_spec.rb | 4 ++-- spec/spec_helper.rb | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/spec/services/full_calendar_formatter_spec.rb b/spec/services/full_calendar_formatter_spec.rb index 45f34c2b..525af045 100644 --- a/spec/services/full_calendar_formatter_spec.rb +++ b/spec/services/full_calendar_formatter_spec.rb @@ -48,7 +48,7 @@ describe FullCalendarFormatter do start: event_schedule1.start_time, end: event_schedule1.end_time, resourceId: room1.guid, - url: conference_program_proposal_path(conference.short_title, event1.id), + url: Rails.application.routes.url_helpers.conference_program_proposal_path(conference.short_title, event1.id), backgroundColor: event1.event_type.color, textColor: 'black' }, @@ -58,7 +58,7 @@ describe FullCalendarFormatter do start: event_schedule2.start_time, end: event_schedule2.end_time, resourceId: room2.guid, - url: conference_program_proposal_path(conference.short_title, event2.id), + url: Rails.application.routes.url_helpers.conference_program_proposal_path(conference.short_title, event2.id), backgroundColor: event2.event_type.color, textColor: 'white' } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e45bfb38..2d680fb2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -123,9 +123,6 @@ RSpec.configure do |config| # enable debugging with --only-failures config.example_status_persistence_file_path = 'tmp/spec_failures.txt' - - # include path helpers - config.include Rails.application.routes.url_helpers end OmniAuth.config.test_mode = true