Sha256: 93645d83f44792f3ad952a3e7d65e6bdaeba9799a4ad9debf9afc3624d98ec24
Contents?: true
Size: 688 Bytes
Versions: 55
Compression:
Stored size: 688 Bytes
Contents
require 'minitest/autorun' ### WARNING: there be hax in this file. require 'rack/session/abstract/id' describe Rack::Session::Abstract::ID do attr_reader :id def setup super @id = Rack::Session::Abstract::ID end it "use securerandom" do assert_equal ::SecureRandom, id::DEFAULT_OPTIONS[:secure_random] id = @id.new nil assert_equal ::SecureRandom, id.sid_secure end it "allow to use another securerandom provider" do secure_random = Class.new do def hex(*args) 'fake_hex' end end id = Rack::Session::Abstract::ID.new nil, :secure_random => secure_random.new id.send(:generate_sid).must_equal 'fake_hex' end end
Version data entries
55 entries across 53 versions & 14 rubygems