diff options
| author | Teddy Wing | 2015-12-08 01:10:52 -0500 |
|---|---|---|
| committer | Teddy Wing | 2015-12-08 01:10:52 -0500 |
| commit | cb06860fa4cd9083eb84929a70353ebe7c7cea18 (patch) | |
| tree | a6c724815535d3721aabf73ad38fdd5e4535db23 /test | |
| parent | 6b352f5a238524f9031c499191a476debecbc9fb (diff) | |
| download | Ruby-Web-Sessions-Exercise-cb06860fa4cd9083eb84929a70353ebe7c7cea18.tar.bz2 | |
Add test for unrecognised user
When logging in with unrecognised credentials, the response should
include "Unrecognized user".
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/auth_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/integration/auth_test.rb b/test/integration/auth_test.rb index f5c94e4..87d1fb5 100644 --- a/test/integration/auth_test.rb +++ b/test/integration/auth_test.rb @@ -11,6 +11,14 @@ class TestAuth < CapybaraTestCase assert has_selector?('//form') end + def test_unrecognised_user_login + fill_in 'username', :with => 'unregistered' + fill_in 'password', :with => 'password' + click_button 'Login' + + assert_text 'Unrecognized user' + end + def test_login fill_in 'username', :with => 'hubertfarnsworth' fill_in 'password', :with => 'secret' |
