[fix]Fix route helpers in tests

This commit is contained in:
Jimmy 2021-04-30 16:20:49 +08:00 committed by CactusPuppy
parent f395f8a26e
commit d2a316d5e4
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
2 changed files with 2 additions and 5 deletions

View file

@ -48,7 +48,7 @@ describe FullCalendarFormatter do
start: event_schedule1.start_time, start: event_schedule1.start_time,
end: event_schedule1.end_time, end: event_schedule1.end_time,
resourceId: room1.guid, 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, backgroundColor: event1.event_type.color,
textColor: 'black' textColor: 'black'
}, },
@ -58,7 +58,7 @@ describe FullCalendarFormatter do
start: event_schedule2.start_time, start: event_schedule2.start_time,
end: event_schedule2.end_time, end: event_schedule2.end_time,
resourceId: room2.guid, 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, backgroundColor: event2.event_type.color,
textColor: 'white' textColor: 'white'
} }

View file

@ -123,9 +123,6 @@ RSpec.configure do |config|
# enable debugging with --only-failures # enable debugging with --only-failures
config.example_status_persistence_file_path = 'tmp/spec_failures.txt' config.example_status_persistence_file_path = 'tmp/spec_failures.txt'
# include path helpers
config.include Rails.application.routes.url_helpers
end end
OmniAuth.config.test_mode = true OmniAuth.config.test_mode = true