Sha256: c8b6552ee7e7c98077d57c66ff40a0ce7679a83e50eb958c151b102e3dd4df3d

Contents?: true

Size: 383 Bytes

Versions: 3

Compression:

Stored size: 383 Bytes

Contents

require "test_helper"

class RandomTest < ActiveSupport::TestCase
  def test_that_hex_tokens_are_unique
    tokens = Array.new(100) { Authlogic::Random.hex_token }
    assert_equal tokens.size, tokens.uniq.size
  end

  def test_that_friendly_tokens_are_unique
    tokens = Array.new(100) { Authlogic::Random.friendly_token }
    assert_equal tokens.size, tokens.uniq.size
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authlogic-4.2.0 test/random_test.rb
authlogic-4.1.1 test/random_test.rb
authlogic-4.1.0 test/random_test.rb