1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Moved the test to after the XML tests

This commit is contained in:
Rodrigo Flores 2011-06-22 21:04:50 -03:00
parent 41bb96be5d
commit 8ef5534d92

View file

@ -221,6 +221,15 @@ class PasswordTest < ActionController::IntegrationTest
assert response.body.include? %(<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<errors>)
end
test "when using json requests to ask a confirmable request, should not return the object" do
user = create_user(:confirm => false)
post user_password_path(:format => :json), :user => { :email => user.email }
assert_response :success
assert_equal response.body, "{}"
end
test "when in paranoid mode and with an invalid e-mail, asking to reset a password should display a message that does not indicates that the e-mail does not exists in the database" do
swap Devise, :paranoid => true do
visit_new_password_path
@ -245,13 +254,4 @@ class PasswordTest < ActionController::IntegrationTest
assert_current_url "/users/password"
end
end
test "when using json requests to ask a confirmable request, should not return the object" do
user = create_user(:confirm => false)
post user_password_path(:format => :json), :user => { :email => user.email }
assert_equal response.code, "201"
assert_equal response.body, "{}"
end
end