Sha256: 319e50434a4879a19e21a418b50910e6f223ca7d21b642f94897a45b8ead77a6
Contents?: true
Size: 1007 Bytes
Versions: 27
Compression:
Stored size: 1007 Bytes
Contents
require 'key_holder_test' class User < ActiveRecord::Base keyholder end class AssociationKeyHolderTest < KeyHolderTest def setup @key_holder=User.create end def test_should_retain_session_key_on_reload key=EzCrypto::Key.generate key_holder.set_session_key key assert_not_nil key_holder.session_key assert_equal key.raw,key_holder.session_key.raw reloaded=User.find key_holder.id assert_not_nil reloaded.session_key assert_equal key.raw,reloaded.session_key.raw end def test_should_retain_session_key_on_reload_for_record_with_key_set_before_create key=EzCrypto::Key.generate key_holder=User.new assert_nil key_holder.session_key key_holder.set_session_key key assert_not_nil key_holder.session_key assert_equal key.raw,key_holder.session_key.raw key_holder.save reloaded=User.find key_holder.id assert_not_nil reloaded.session_key assert_equal key.raw,reloaded.session_key.raw end end
Version data entries
27 entries across 27 versions & 5 rubygems