summaryrefslogtreecommitdiff
path: root/test/integration/browser/session_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/browser/session_test.rb')
-rw-r--r--test/integration/browser/session_test.rb20
1 files changed, 5 insertions, 15 deletions
diff --git a/test/integration/browser/session_test.rb b/test/integration/browser/session_test.rb
index 3a41b3a..fb20847 100644
--- a/test/integration/browser/session_test.rb
+++ b/test/integration/browser/session_test.rb
@@ -2,26 +2,16 @@ require 'test_helper'
class SessionTest < BrowserIntegrationTest
- setup do
- @username, password = submit_signup
- end
-
- teardown do
- user = User.find_by_login(@username)
- id = user.identity
- id.destroy
- user.destroy
- end
-
test "valid session" do
- assert page.has_content?("Welcome #{@username}")
+ login
+ assert page.has_content?("Logout")
end
test "expired session" do
- assert page.has_content?("Welcome #{@username}")
- pretend_now_is(Time.now + 40.minutes) do
+ login
+ pretend_now_is(Time.now + 80.minutes) do
visit '/'
- assert page.has_no_content?("Welcome #{@username}")
+ assert page.has_content?("Log In")
end
end
end