Sha256: c329c017c456b9842d7f71fac1b192983df2108e61e3a50ffbc28b767ae0f364

Contents?: true

Size: 587 Bytes

Versions: 3

Compression:

Stored size: 587 Bytes

Contents

require "test_helper"

module Devise
  module Async
    module Backend
      describe "Sidekiq" do
        it "enqueues job" do
          Sidekiq.expects(:perform_async).with(:mailer_method, "User", 123)
          Sidekiq.enqueue(:mailer_method, "User", 123)
        end

        it "delegates to devise mailer when delivering" do
          user = create_user
          ActionMailer::Base.deliveries = []
          Backend::Sidekiq.new.perform(:confirmation_instructions, "User", user.id)
          ActionMailer::Base.deliveries.size.must_equal 1
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise-async-0.1.1 test/devise/async/backend/sidekiq_test.rb
devise-async-0.1.0 test/devise/async/backend/sidekiq_test.rb
devise-async-0.0.2 test/devise/async/backend/sidekiq_test.rb