class TestUtils

Public Instance Methods

test_hash_each() click to toggle source
# File lib/authing_ruby/test/mini_test/TestUtils.rb, line 23
def test_hash_each
        hash = {
                a:1,
                b:2,
        }
        hash.each do |key, value|
                puts "key: #{key}"
                puts "value: #{value}"
                puts "---"
        end
end
test_randomNumberString() click to toggle source
# File lib/authing_ruby/test/mini_test/TestUtils.rb, line 18
def test_randomNumberString
        random = AuthingRuby::Utils.randomNumberString(10)
        assert(random.length == 10)
end
test_randomString() click to toggle source

测试生成随机字符串

# File lib/authing_ruby/test/mini_test/TestUtils.rb, line 13
def test_randomString
        random = AuthingRuby::Utils.generateRandomString(43)
        assert(random.length == 43)
end