1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

update tests for SecureRandom.base58 method

This commit is contained in:
jithindasad 2021-05-12 01:05:22 +05:30
parent 8d01462c85
commit 153f4fe284

View file

@ -10,6 +10,10 @@ class SecureRandomTest < ActiveSupport::TestCase
assert_not_equal s1, s2
assert_equal 16, s1.length
assert_match(/^[a-zA-Z0-9]+$/, s1)
assert_match(/^[a-zA-Z0-9]+$/, s2)
assert_match(/^[^0OIl]+$/, s1)
assert_match(/^[^0OIl]+$/, s2)
end
def test_base58_with_length
@ -18,6 +22,10 @@ class SecureRandomTest < ActiveSupport::TestCase
assert_not_equal s1, s2
assert_equal 24, s1.length
assert_match(/^[a-zA-Z0-9]+$/, s1)
assert_match(/^[a-zA-Z0-9]+$/, s2)
assert_match(/^[^0OIl]+$/, s1)
assert_match(/^[^0OIl]+$/, s2)
end
def test_base36