aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/auth_test.rb
diff options
context:
space:
mode:
authorTeddy Wing2015-12-08 01:22:02 -0500
committerTeddy Wing2015-12-08 01:22:02 -0500
commit61e3141fb526e6a967e9eee01de4fae474b4e9cc (patch)
tree7d0755c83b4af75bedefc85f4a0dfeba8600361e /test/integration/auth_test.rb
parent6eef2d15e7935dc21580dd7c9e4042d3b8564b4d (diff)
downloadRuby-Web-Sessions-Exercise-61e3141fb526e6a967e9eee01de4fae474b4e9cc.tar.bz2
auth_test.rb: Add logout test
Diffstat (limited to 'test/integration/auth_test.rb')
-rw-r--r--test/integration/auth_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/integration/auth_test.rb b/test/integration/auth_test.rb
index 3e98788..285fdbe 100644
--- a/test/integration/auth_test.rb
+++ b/test/integration/auth_test.rb
@@ -31,4 +31,12 @@ class TestAuth < CapybaraTestCase
assert_equal 200, page.status_code
end
+
+ def test_logout
+ login_with_correct_credentials
+ visit '/logout'
+
+ assert_text 'Login'
+ assert_equal '/', current_path
+ end
end