test/failure_app_test.rb in devise-1.0.11 vs test/failure_app_test.rb in devise-1.1.pre
- old
+ new
@@ -2,10 +2,15 @@
require 'ostruct'
class FailureTest < ActiveSupport::TestCase
def call_failure(env_params={})
- env = {'warden.options' => { :scope => :user }}.merge!(env_params)
+ env = {
+ 'warden.options' => { :scope => :user },
+ 'REQUEST_URI' => 'http://test.host/',
+ 'REQUEST_METHOD' => 'GET',
+ 'rack.session' => {}
+ }.merge!(env_params)
Devise::FailureApp.call(env)
end
test 'return 302 status' do
assert_equal 302, call_failure.first