diff --git a/lib/fog/aws/models/iam/user.rb b/lib/fog/aws/models/iam/user.rb index 380a36590..31814041b 100644 --- a/lib/fog/aws/models/iam/user.rb +++ b/lib/fog/aws/models/iam/user.rb @@ -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 diff --git a/tests/aws/models/iam/users_tests.rb b/tests/aws/models/iam/users_tests.rb index 3c30fc732..7ec34cd10 100644 --- a/tests/aws/models/iam/users_tests.rb +++ b/tests/aws/models/iam/users_tests.rb @@ -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