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

fixes issue#1313 ~ Creating user via Aws.iam.users ignores :path

This commit is contained in:
VirtualStaticVoid 2012-11-29 09:54:47 +02:00
parent 6c4323d4c2
commit d4aa72ae59
2 changed files with 10 additions and 2 deletions

View file

@ -13,7 +13,7 @@ module Fog
def save
requires :id
data = connection.create_user(id).body['User']
data = connection.create_user(id, path).body['User']
merge_attributes(data)
true
end

View file

@ -4,12 +4,20 @@ Shindo.tests("Fog::Compute[:iam] | users", ['aws','iam']) do
@iam = Fog::AWS[:iam]
@user_one_name = 'fake_user_one'
@user_two_name = 'fake_user_two'
@user_three_name = 'fake_user_three'
@user_three_path = '/path/to/fake_user_three/'
tests('#create').succeeds do
@user_one = @iam.users.create(:id => @user_one_name)
@user_one.id == @user_one_name
end
tests('#create', 'assigns path').succeeds do
@user_three = @iam.users.create(:id => @user_three_name, :path => @user_three_path)
@user_three.path == @user_three_path
end
tests('#all','there is only one user').succeeds do
@iam.users.size == 1
end