summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_securerandom.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_securerandom.rb b/test/test_securerandom.rb
index 9b2c8a5e67..5f08182115 100644
--- a/test/test_securerandom.rb
+++ b/test/test_securerandom.rb
@@ -144,9 +144,10 @@ end
end
def test_alphanumeric
- 65.times do |idx|
- an = @it.alphanumeric
- assert_match(/^[0-9a-zA-Z]+$/, an)
+ 65.times do |n|
+ an = @it.alphanumeric(n)
+ assert_match(/^[0-9a-zA-Z]*$/, an)
+ assert_equal(n, an.length)
end
end