photomix/vendor/plugins/authlogic/test/session_test/persistence_test.rb
2011-04-11 18:07:31 +08:00

21 lines
473 B
Ruby

require 'test_helper'
module SessionTest
class PersistenceTest < ActiveSupport::TestCase
def test_find
ben = users(:ben)
assert !UserSession.find
http_basic_auth_for(ben) { assert UserSession.find }
set_cookie_for(ben)
assert UserSession.find
unset_cookie
set_session_for(ben)
session = UserSession.find
assert session
end
def test_persisting
# tested thoroughly in test_find
end
end
end