photomix/vendor/plugins/authlogic/test/session_test/persistence_test.rb

21 lines
473 B
Ruby
Raw Normal View History

2011-04-11 12:07:31 +02:00
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