diff options
author | Azul <azul@riseup.net> | 2016-03-24 14:14:18 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-05-02 08:28:44 -0300 |
commit | 4bfbeedd9cf5f0f2a4b364764afd9c6acdc7399f (patch) | |
tree | 73179bde2951099510f6f99138192378cd4d543a /vendor/gems/couchrest_session_store/test/session_store_test.rb | |
parent | 5d18e8c396181ee8fab3f8579bc19abaee106d52 (diff) |
upgrade: separate CouchRest::Session from Document
CouchRest::Session now offers the high leven API while
CouchRest::Session::Document only extends the CouchRest::Document
to have the properties (rotation, naming, etc...) that we want.
A Session has a Session::Document instead of inheriting from it.
Diffstat (limited to 'vendor/gems/couchrest_session_store/test/session_store_test.rb')
-rw-r--r-- | vendor/gems/couchrest_session_store/test/session_store_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/gems/couchrest_session_store/test/session_store_test.rb b/vendor/gems/couchrest_session_store/test/session_store_test.rb index 4fbf30b..5949ae6 100644 --- a/vendor/gems/couchrest_session_store/test/session_store_test.rb +++ b/vendor/gems/couchrest_session_store/test/session_store_test.rb @@ -64,10 +64,10 @@ class SessionStoreTest < MiniTest::Test def test_stored_and_not_expired_yet sid, session = expiring_session - doc = CouchRest::Session::Document.fetch(sid) - expires = doc.send :expires + couchrest_session = CouchRest::Session.fetch(sid) + expires = couchrest_session.send :expires assert expires - assert !doc.expired? + assert !couchrest_session.expired? assert (expires - Time.now) > 0, "Exiry should be in the future" assert (expires - Time.now) <= 300, "Should expire after 300 seconds - not more" assert_equal [sid, session], store.send(:get_session, env, sid) |