getaddrinfo: nodename nor servname provided, or not known
The error occurs when the DNS resolution fails. Check if you can wget (or curl) the api url from the command line. Changing the DNS server and testing it might help.
The error occurs when the DNS resolution fails. Check if you can wget (or curl) the api url from the command line. Changing the DNS server and testing it might help.
To manually call a job Delayed::Job.find(10).invoke_job # 10 is the job.id This does not remove the job if it is run successfully. You need to remove it manually: Delayed::Job.find(10).destroy
If I understand you correctly, you could do: message_delivery = instance_double(ActionMailer::MessageDelivery) expect(ServiceMailer).to receive(:new_user).with(@user).and_return(message_delivery) allow(message_delivery).to receive(:deliver_later) The key thing is that you need to somehow provide a double for deliver_later.
You can also do it like this: Delayed::Worker.new.run( Delayed::Job.find(x) )