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:
parent
41bb96be5d
commit
8ef5534d92
1 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue