Sha256: 8628d47eacae6c82db279f4807e2411878fc0bed91cadb614ae5e9f95758916e

Contents?: true

Size: 535 Bytes

Versions: 3

Compression:

Stored size: 535 Bytes

Contents

require "test_helper"

module Devise
  module Async
    module Backend
      describe "Base" do
        it "delegates to configured mailer" do
          Devise.mailer = "MyMailer"
          user = create_user
          mailer_instance = mock(:deliver => true)

          MyMailer.expects(:confirmation_instructions).once.returns(mailer_instance)
          Base.new.perform(:confirmation_instructions, "User", user.id, {})
        end

        after do
          Devise.mailer = "Devise::Mailer"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise-async-0.8.0 test/devise/async/backend/base_test.rb
devise-async-0.7.0 test/devise/async/backend/base_test.rb
devise-async-0.6.0 test/devise/async/backend/base_test.rb