aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/integration/auth_test.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/integration/auth_test.rb b/test/integration/auth_test.rb
index df60187..f5c94e4 100644
--- a/test/integration/auth_test.rb
+++ b/test/integration/auth_test.rb
@@ -2,8 +2,20 @@ require 'integration_test_helper'
class TestAuth < CapybaraTestCase
- def test_index_has_login_form
+ def setup
visit '/'
+ end
+
+ def test_index_has_login_form
+ assert_text 'Login'
+ assert has_selector?('//form')
+ end
+
+ def test_login
+ fill_in 'username', :with => 'hubertfarnsworth'
+ fill_in 'password', :with => 'secret'
+ click_button 'Login'
+
assert_equal 200, page.status_code
end
end