Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (15 sloc) 0.633 kb
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
Jump to Line
Something went wrong with that request. Please try again.