diff options
author | azul <azul@riseup.net> | 2013-09-05 02:49:39 -0700 |
---|---|---|
committer | azul <azul@riseup.net> | 2013-09-05 02:49:39 -0700 |
commit | e11c158a15d54aea0eaefe698e7466634bacf204 (patch) | |
tree | 075dd62a775f02c20017a8bc42850cf8548f3996 | |
parent | d9c98589f92fd0fc3fda83d37383ff4cb8ee4396 (diff) | |
parent | c08a5331347571d7a0a7da5629a16e394da18716 (diff) |
Merge pull request #80 from azul/bugfix/fix-tests-broken-by-route-removal
use /login instead of /sessions/new and test successful login
-rw-r--r-- | users/test/integration/browser/account_test.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/users/test/integration/browser/account_test.rb b/users/test/integration/browser/account_test.rb index 8b214a4..a5ec2c5 100644 --- a/users/test/integration/browser/account_test.rb +++ b/users/test/integration/browser/account_test.rb @@ -18,10 +18,20 @@ class AccountTest < BrowserIntegrationTest user.destroy end + test "successful login" do + username, password = submit_signup + click_on 'Logout' + click_on 'Log In' + fill_in 'Username', with: username + fill_in 'Password', with: password + click_on 'Log In' + assert page.has_content?("Welcome #{username}") + end + # trying to seed an invalid A for srp login test "detects attempt to circumvent SRP" do user = FactoryGirl.create :user - visit '/sessions/new' + visit '/login' fill_in 'Username', with: user.login fill_in 'Password', with: "password" inject_malicious_js |