update tests for SecureRandom.base58 method

This commit is contained in:
jithindasad 2021-05-12 01:05:22 +05:30
parent 8d01462c85
commit 153f4fe284
1 changed files with 8 additions and 0 deletions

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