diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-07-29 07:21:24 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-07-29 07:21:24 -0700 |
commit | 69a8fc2f30188e8947af304d7f804d51d05de00a (patch) | |
tree | fe2ac644f85a7b40b495131b5c511024cc42bf75 | |
parent | 28e20d62f3dcb29f34c2f67b41a1b486108f388d (diff) | |
download | chef-jdm/group-specs.tar.gz |
Fix group resource functional specsjdm/group-specs
-rw-r--r-- | spec/functional/resource/group_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb index 529af52d4e..daf4a448ed 100644 --- a/spec/functional/resource/group_spec.rb +++ b/spec/functional/resource/group_spec.rb @@ -207,13 +207,16 @@ describe Chef::Resource::Group, :requires_root_or_running_windows, :not_supporte describe "when the users doesn't exist" do describe "when append is not set" do it "should raise an error" do - expect { @grp_resource.run_action(tested_action) }.to raise_error + expect { group_resource.run_action(tested_action) }.to raise_error(Chef::Exceptions::Win32APIError) end end describe "when append is set" do + before do + group_resource.append(true) + end it "should raise an error" do - expect { @grp_resource.run_action(tested_action) }.to raise_error + expect { group_resource.run_action(tested_action) }.to raise_error(Chef::Exceptions::Win32APIError) end end end @@ -300,7 +303,7 @@ theoldmanwalkingdownthestreetalwayshadagoodsmileonhisfacetheoldmanwalking\ downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestreeQQQQQQ" } it "should not create a group" do - expect { group_resource.run_action(:create) }.to raise_error + expect { group_resource.run_action(:create) }.to raise_error(ArgumentError) group_should_not_exist(group_name) end end |