Testing that Devise is re-sending confirmation instructions email in a background worker
问题 I want to send Devise confirmation instructions to users a second time if they haven't confirmed within two days of signing up, however I can't seem to get my success case test to pass. Background worker (runs once a day): class ResendConfirmationWorker include Sidekiq::Worker sidekiq_options queue: :resend_confirmation, retry: false def perform d = Time.zone.now - 2.days users = User.where.not(confirmation_sent_at: nil) .where(confirmed_at: nil) .where(created_at: d.beginning_of_day..d.end