summaryrefslogtreecommitdiff
path: root/spec/unit/provider
diff options
context:
space:
mode:
authorMukta Aphale <Mukta.Aphale@Clogeny.com>2013-06-25 05:39:44 +0530
committeradamedx <adamed@opscode.com>2013-09-03 14:46:45 -0700
commitb523967c7d50fcda13ee9604febd78ffa124d8cb (patch)
tree48352d5ac975b46fe2bad072378e82194186fc19 /spec/unit/provider
parentfa45d2ab640ffcd1c0a69c4dead8d83fb8fd4262 (diff)
downloadchef-b523967c7d50fcda13ee9604febd78ffa124d8cb.tar.gz
Unit test for group_name test in NetGroup for Windows provider
Diffstat (limited to 'spec/unit/provider')
-rw-r--r--spec/unit/provider/group/windows_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/provider/group/windows_spec.rb b/spec/unit/provider/group/windows_spec.rb
index 084d1d0acf..c89f55fe8a 100644
--- a/spec/unit/provider/group/windows_spec.rb
+++ b/spec/unit/provider/group/windows_spec.rb
@@ -92,3 +92,16 @@ describe Chef::Provider::Group::Windows do
end
end
end
+
+describe Chef::Provider::Group::Windows, "NetGroup" do
+ before do
+ @node = Chef::Node.new
+ @events = Chef::EventDispatch::Dispatcher.new
+ @run_context = Chef::RunContext.new(@node, {}, @events)
+ @new_resource = Chef::Resource::Group.new("Remote Desktop Users")
+ end
+ it 'sets group_name correctly' do
+ Chef::Util::Windows::NetGroup.should_receive(:new).with("Remote Desktop Users")
+ Chef::Provider::Group::Windows.new(@new_resource, @run_context)
+ end
+end