Sha256: bc0934eb751572ae5804cfc237fb7f1f8492a2297b64f56494c4666cd6d52847

Contents?: true

Size: 374 Bytes

Versions: 4

Compression:

Stored size: 374 Bytes

Contents

require "test_helper"

class SecureRandomTest < MiniTest::Unit::TestCase
  def test_base58
    s1 = SecureRandom.base58
    s2 = SecureRandom.base58

    refute_equal s1, s2
    assert_equal 16, s1.length
  end

  def test_base58_with_length
    s1 = SecureRandom.base58(24)
    s2 = SecureRandom.base58(24)

    refute_equal s1, s2
    assert_equal 24, s1.length
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
super_token-1.1.0 test/securerandom_test.rb
super_token-1.0.0 test/securerandom_test.rb
active_model_secure_token-1.0.0 test/securerandom_test.rb
has_secure_token-1.0.0 test/securerandom_test.rb