Sha256: 4d21a90f40883bbcd7bb922db735d670299fd8192896ee9fd5b86fcf211783a0

Contents?: true

Size: 633 Bytes

Versions: 62

Compression:

Stored size: 633 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

62 entries across 57 versions & 9 rubygems

Version Path
devise-3.2.3 test/delegator_test.rb
devise-3.2.2 test/delegator_test.rb
devise-3.2.1 test/delegator_test.rb
devise-3.1.2 test/delegator_test.rb
devise-3.0.4 test/delegator_test.rb
devise-2.2.8 test/delegator_test.rb
devise-3.2.0 test/delegator_test.rb
devise-3.1.1 test/delegator_test.rb
devise-3.1.0 test/delegator_test.rb
devise-2.0.6 test/delegator_test.rb
devise-2.1.4 test/delegator_test.rb
devise-2.2.7 test/delegator_test.rb
devise-3.0.3 test/delegator_test.rb
devise-3.1.0.rc2 test/delegator_test.rb
devise-2.2.6 test/delegator_test.rb
devise-3.0.2 test/delegator_test.rb
devise-3.0.1 test/delegator_test.rb
devise-2.2.5 test/delegator_test.rb
loyal_devise-2.1.7 test/delegator_test.rb
loyal_devise-2.1.6 test/delegator_test.rb