Sha256: 7ae3f70840f11d5901430f9565e510aafcff11d2dd0be8eaf41583dd65c63931
Contents?: true
Size: 381 Bytes
Versions: 4
Compression:
Stored size: 381 Bytes
Contents
require "securerandom" require_relative "../lib/tynn/session" test "session" do Tynn.helpers(Tynn::Session, secret: SecureRandom.hex(64)) Tynn.define do root do session[:foo] = "foo" res.write(session[:foo]) end end app = Tynn::Test.new app.get("/") assert_equal "foo", app.res.body assert_equal "foo", app.req.env["rack.session"]["foo"] end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tynn-1.0.0 | test/session_test.rb |
tynn-1.0.0.rc3 | test/session_test.rb |
tynn-1.0.0.rc2 | test/session_test.rb |
tynn-1.0.0.rc1 | test/session_test.rb |