2011-04-15 04:38:16 -04:00
|
|
|
require 'test_helper'
|
2011-04-14 20:57:56 -04:00
|
|
|
|
|
|
|
class SessionsControllerTest < ActionController::TestCase
|
|
|
|
tests Devise::SessionsController
|
|
|
|
include Devise::TestHelpers
|
|
|
|
|
2011-04-17 13:37:19 -04:00
|
|
|
test "#create doesn't raise exception after Warden authentication fails when TestHelpers included" do
|
2011-04-14 20:57:56 -04:00
|
|
|
request.env["devise.mapping"] = Devise.mappings[:user]
|
2011-04-17 13:37:19 -04:00
|
|
|
post :create, :user => {
|
|
|
|
:email => "nosuchuser@example.com",
|
|
|
|
:password => "wevdude"
|
|
|
|
}
|
|
|
|
assert_equal 200, @response.status
|
|
|
|
assert_template "devise/sessions/new"
|
2011-04-14 20:57:56 -04:00
|
|
|
end
|
|
|
|
end
|