diff --git a/test/integration/confirmable_test.rb b/test/integration/confirmable_test.rb index 350cece7..b16e4cef 100644 --- a/test/integration/confirmable_test.rb +++ b/test/integration/confirmable_test.rb @@ -106,7 +106,7 @@ class ConfirmationTest < ActionController::IntegrationTest user = create_user(:confirm => false) post user_confirmation_path(:format => 'xml'), :user => { :email => user.email } assert_response :success - assert response.body.include? %(\n) + assert_equal response.body, {}.to_xml end test 'resent confirmation token with invalid E-Mail in XML format should return invalid response' do @@ -130,6 +130,14 @@ class ConfirmationTest < ActionController::IntegrationTest assert response.body.include? %(\n) end + test 'request an account confirmation account with JSON, should return an empty JSON' do + user = create_user(:confirm => false) + + post user_confirmation_path, :user => { :email => user.email }, :format => :json + assert_response :success + assert_equal response.body, {}.to_json + end + test "when in paranoid mode and with a valid e-mail, should not say that the e-mail is valid" do swap Devise, :paranoid => true do user = create_user(:confirm => false)