Sha256: 27ad77f777f4d2f95c9d1794fafdf283f41c69f47a7ad6c2aa2908840c14add7

Contents?: true

Size: 630 Bytes

Versions: 37

Compression:

Stored size: 630 Bytes

Contents

require 'test_helper'

class DelegatorTest < ActiveSupport::TestCase
  def delegator
    Devise::Delegator.new
  end

  test 'failure_app returns default failure app if no warden options in env' do
    assert_equal Devise::FailureApp, delegator.failure_app({})
  end

  test 'failure_app returns default failure app if no scope in warden options' do
    assert_equal Devise::FailureApp, delegator.failure_app({"warden.options" => {}})
  end

  test 'failure_app returns associated failure app by scope in the given environment' do
    assert_kind_of Proc, delegator.failure_app({"warden.options" => {scope: "manager"}})
  end
end

Version data entries

37 entries across 37 versions & 7 rubygems

Version Path
devise-4.3.0 test/delegator_test.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/test/delegator_test.rb
devise-4.2.1 test/delegator_test.rb
devise-4.2.0 test/delegator_test.rb
devise-3.5.10 test/delegator_test.rb
devise-4.0.3 test/delegator_test.rb
devise-4.1.1 test/delegator_test.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/test/delegator_test.rb
devise-4.1.0 test/delegator_test.rb
devise-3.5.9 test/delegator_test.rb
devise-4.0.2 test/delegator_test.rb
devise-4.0.1 test/delegator_test.rb
devise-3.5.8 test/delegator_test.rb
devise-3.5.7 test/delegator_test.rb
devise-4.0.0 test/delegator_test.rb
devise-4.0.0.rc2 test/delegator_test.rb
devise-4.0.0.rc1 test/delegator_test.rb
devise-3.5.6 test/delegator_test.rb
devise-3.5.5 test/delegator_test.rb
devise-3.5.4 test/delegator_test.rb