diff options
author | James Kiesel <james.kiesel@gmail.com> | 2014-10-10 16:40:59 +0400 |
---|---|---|
committer | James Kiesel <james.kiesel@gmail.com> | 2014-10-11 01:47:00 +0400 |
commit | e2e502ea68e8a7b1838464086e4099ad3a2f4c0b (patch) | |
tree | 32f8590e6a12ac9e519871df9c2b27686f2cde57 | |
parent | d44300c7a2b7bc8bd33ab880134695d0dc75d490 (diff) |
Show error message on invalid reset password attempt
-rw-r--r-- | app/views/passwords/new.haml | 2 | ||||
-rw-r--r-- | features/desktop/change_password.feature | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app/views/passwords/new.haml b/app/views/passwords/new.haml index 9ffcca124..9ee0347e5 100644 --- a/app/views/passwords/new.haml +++ b/app/views/passwords/new.haml @@ -5,6 +5,8 @@ %h1{id: "huge-text"}= AppConfig.settings.pod_name = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => {:class => "form-horizontal block-form"}, :autocomplete => 'off') do |f| + %legend + %i= t('devise.passwords.new.no_account') unless devise_error_messages!.empty? %fieldset .control-group %label{class: "control-label", for: "user_email", style: "width: 40%; text-align: center; padding: 10px 0; overflow: hidden"} diff --git a/features/desktop/change_password.feature b/features/desktop/change_password.feature index 889d97e08..7c604faf6 100644 --- a/features/desktop/change_password.feature +++ b/features/desktop/change_password.feature @@ -22,3 +22,9 @@ Feature: Change password When I fill out reset password form with "supersecret" and "supersecret" And I submit reset password form Then I should be on the stream page + + Scenario: Attempt to reset password with invalid email + Given I am on forgot password page + When I fill out forgot password form with "notanemail" + And I submit forgot password form + Then I should see "No account with this email exists" |