I have the following method in a Sidekiq worker:
def self.schedule_edits(course:, editing_user:, enrollment_results:)
puts editing_user.id
perform_async(course.id, editing_user.id, enrollment_results)
end
I have a controller test that, when it calls this code throws the following warning:
WARN: Job arguments to MassEnrollmentWorker do not serialize to JSON safely. This will raise an error...
I have read up on the warning HERE and I'm guessing that enrollment_results is the offending argument. However, when I run the test and output enrollment_results, here is what I see:
{"FirstUser"=>{:success=>"User added to course."}, "SecondUser"=>{:success=>"User added to course."}, "NotARealUserOnWikipedia"=>{:failure=>"Not an existing user."}
This appears to be a valid hash, so what is the issue?