mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
19 lines
528 B
Ruby
19 lines
528 B
Ruby
|
require 'fog/serverlove/util/compute/password_generator'
|
||
|
|
||
|
Shindo.tests('Fog::Compute::Serverlove::PasswordGenerator | generate password', ['serverlove']) do
|
||
|
|
||
|
@password = Fog::Compute::Serverlove::PasswordGenerator.generate
|
||
|
|
||
|
tests("@password.length").returns(8) do
|
||
|
@password.length
|
||
|
end
|
||
|
|
||
|
tests("@password contains one capital letter").returns(true) do
|
||
|
@password.match(/[A-Z]/) && true
|
||
|
end
|
||
|
|
||
|
tests("@password contains one lower case letter").returns(true) do
|
||
|
@password.match(/[a-z]/) && true
|
||
|
end
|
||
|
|
||
|
end
|