I have this code in my test.rb :
config.active_job.queue_adapter = :inline
In the test I have:
scenario '15 minutes after last call a recall should happen' do
p ActiveJob::Base.queue_adapter
end
This returns: ActiveJob::QueueAdapters::InlineAdapter
which is good because the perform_later are executed immediately.
However when I add type: :request to the test like this:
scenario '15 minutes after last call a recall should happen', type: :request do
p ActiveJob::Base.queue_adapter
end
i'm getting: requestActiveJob::QueueAdapters::TestAdapter and the perform_later isn't executed anymore. Is this intended behaviour? How can I make sure the perform_later blocks are always executed in tests?