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:
parent
8d01462c85
commit
153f4fe284
1 changed files with 8 additions and 0 deletions
|
@ -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 a new issue