1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[AWS|IAM] Fix user count tests (there will be at least 1 other user on the account for fog access)

This commit is contained in:
Michael Hale 2014-11-12 17:15:48 -05:00
parent 73da78afa7
commit 9c96b96ea0

View file

@ -8,17 +8,21 @@ Shindo.tests("Fog::Compute[:iam] | users", ['aws','iam']) do
@user_three_path = '/path/to/fake_user_three/'
@user_four_name = 'fake_user_four'
def all_users
@iam.users.all.select{|user| user.id =~ /^fake_user/ }
end
tests('#create').succeeds do
@user_one = @iam.users.create(:id => @user_one_name)
@user_one.id == @user_one_name
end
tests('#all','there is only one user').succeeds do
@iam.users.size == 1
all_users.size == 1
end
tests('#all','the only user should match').succeeds do
@iam.users.first.id == @user_one_name
all_users.first.id == @user_one_name
end
tests('#create','a second user').succeeds do
@ -27,7 +31,7 @@ Shindo.tests("Fog::Compute[:iam] | users", ['aws','iam']) do
end
tests('#all','there are two users').succeeds do
@iam.users.size == 2
all_users.size == 2
end
tests('#get','an existing user').succeeds do