mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[tests] replace letters with letters and numbers with numbers in collection#get failure test
This commit is contained in:
parent
3cf54d48ef
commit
9553c3805e
1 changed files with 4 additions and 6 deletions
|
@ -38,12 +38,10 @@ def collection_tests(collection, params = {}, mocks_implemented = true)
|
|||
tests('failure') do
|
||||
|
||||
if !Fog.mocking? || mocks_implemented
|
||||
@identity = case @identity
|
||||
when Integer
|
||||
@identity.to_s.gsub(/\w/, Fog::Mock.random_numbers(1)).to_i
|
||||
else
|
||||
@identity.to_s.gsub(/\w/, Fog::Mock.random_letters(1))
|
||||
end
|
||||
@identity = @identity.to_s
|
||||
@identity.gsub!(/[a-zA-Z]/) { Fog::Mock.random_letters(1) }
|
||||
@identity.gsub!(/\d/) { Fog::Mock.random_numbers(1) }
|
||||
@identity
|
||||
end
|
||||
|
||||
tests("#get('#{@identity}')").returns(nil) do
|
||||
|
|
Loading…
Reference in a new issue