update tests for SecureRandom.base58 method
This commit is contained in:
parent
8d01462c85
commit
153f4fe284
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue