+ # Test resetting using an address that does not exist
+ assert_no_difference "ActionMailer::Base.deliveries.size" do
+ perform_enqueued_jobs do
+ post user_forgot_password_path, :params => { :email => "nobody@example.com" }
+ end
+ end
+ # Be paranoid about revealing there was no match
+ assert_redirected_to login_path
+ assert_match(/^If your email address exists/, flash[:notice])
+