diff options
author | Azul <azul@leap.se> | 2013-10-28 10:48:53 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-10-28 10:51:04 +0100 |
commit | 315a7c9aa3d6cc6cde51a67b6dcc91aea085f518 (patch) | |
tree | 78a82769ccebea12df994eeeddf6c959772aacff /users/test/integration/browser/account_test.rb | |
parent | 630b6c603594df8a9fa99555928ca68df8e8d8fa (diff) |
reset button loading... state on error (#4231)
including test
refactored error display some
Diffstat (limited to 'users/test/integration/browser/account_test.rb')
-rw-r--r-- | users/test/integration/browser/account_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/users/test/integration/browser/account_test.rb b/users/test/integration/browser/account_test.rb index 1deda45..243ccfb 100644 --- a/users/test/integration/browser/account_test.rb +++ b/users/test/integration/browser/account_test.rb @@ -27,6 +27,20 @@ class AccountTest < BrowserIntegrationTest User.find_by_login(username).account.destroy end + test "failed login" do + username, password = submit_signup + click_on 'Logout' + click_on 'Log In' + fill_in 'Username', with: username + fill_in 'Password', with: "wrong password" + click_on 'Log In' + assert page.has_selector? 'input.btn-primary.disabled' + assert page.has_content? I18n.t(:invalid_user_pass) + assert page.has_no_content?("Welcome #{username}") + assert page.has_no_selector? 'input.btn-primary.disabled' + User.find_by_login(username).account.destroy + end + test "change password" do username, password = submit_signup click_on "Account Settings" |