diff options
author | Kapil Chouhan <kapil.chouhan@msystechnologies.com> | 2018-12-12 11:25:30 +0000 |
---|---|---|
committer | Kapil Chouhan <kapil.chouhan@msystechnologies.com> | 2018-12-13 06:48:04 +0000 |
commit | 07878224095900e779d6e635574816f7f40ad23d (patch) | |
tree | 2ba9ba824b2ff91415fd9049d2a5d554da77297f /spec/unit/resource | |
parent | f840677605ccdf9e15e742163028b069eeb8b6e8 (diff) | |
download | chef-07878224095900e779d6e635574816f7f40ad23d.tar.gz |
Added support for setting the comment/description on a group in Windows. This is only for the Windows group.
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
Diffstat (limited to 'spec/unit/resource')
-rw-r--r-- | spec/unit/resource/group_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/unit/resource/group_spec.rb b/spec/unit/resource/group_spec.rb index 60f72b6785..6d9df79299 100644 --- a/spec/unit/resource/group_spec.rb +++ b/spec/unit/resource/group_spec.rb @@ -49,6 +49,10 @@ describe Chef::Resource::Group, "initialize" do expect(resource.members).to eql([]) end + it "defaults comment to be nil" do + expect(resource.comment).to eql(nil) + end + it "aliases users to members, also an empty array" do expect(resource.users).to eql([]) end @@ -146,3 +150,16 @@ describe Chef::Resource::Group, "append" do end end end + +describe Chef::Resource::Group, "comment" do + let(:resource) { Chef::Resource::Group.new("fakey_fakerton") } + + it "allows an string" do + resource.comment "this is a group comment" + expect(resource.comment).to eql("this is a group comment") + end + + it "does not allow a hash" do + expect { resource.send(:comment, { some_other_user: "is freakin awesome" }) }.to raise_error(ArgumentError) + end +end |