Module: ActiveRecord::RandomID::Etest

Defined in:
lib/vex/active_record/random_id.rb

Defined Under Namespace

Classes: RandomBase

Instance Method Summary collapse

Instance Method Details

#test_random_idObject



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/vex/active_record/random_id.rb', line 44

def test_random_id
  rb = RandomBase.create!
  uids = [ rb.id ]
  rb.save
  uids << rb.id
  
  rb.reload
  uids << rb.id

  assert_not_nil(rb.id)
  assert_equal([ rb.id ], uids.uniq)
end