summaryrefslogtreecommitdiff
path: root/spec/unit/provider/file/windows_spec.rb
diff options
context:
space:
mode:
authorStig Sandbeck Mathisen <ssm@debian.org>2014-09-07 10:14:36 +0200
committerStig Sandbeck Mathisen <ssm@debian.org>2014-09-07 10:14:36 +0200
commitd4b83be375ac1dead058e091191ee7c7b7c24c8a (patch)
treedc825687392ae3068de5b764be60c53122d9e02a /spec/unit/provider/file/windows_spec.rb
parent229cbb976fe0f70f5f30548b83517b415840f9bb (diff)
parent1681684857c6e39d60d87b0b3520d8783977ceff (diff)
downloadpuppet-upstream/3.7.0.tar.gz
Imported Upstream version 3.7.0upstream/3.7.0
Diffstat (limited to 'spec/unit/provider/file/windows_spec.rb')
-rwxr-xr-xspec/unit/provider/file/windows_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/provider/file/windows_spec.rb b/spec/unit/provider/file/windows_spec.rb
index a0e9d3a4e..f6d7ef0e7 100755
--- a/spec/unit/provider/file/windows_spec.rb
+++ b/spec/unit/provider/file/windows_spec.rb
@@ -49,22 +49,22 @@ describe Puppet::Type.type(:file).provider(:windows), :if => Puppet.features.mic
describe "#id2name" do
it "should return the name of the user identified by the sid" do
- Puppet::Util::Windows::Security.expects(:valid_sid?).with(sid).returns(true)
- Puppet::Util::Windows::Security.expects(:sid_to_name).with(sid).returns(account)
+ Puppet::Util::Windows::SID.expects(:valid_sid?).with(sid).returns(true)
+ Puppet::Util::Windows::SID.expects(:sid_to_name).with(sid).returns(account)
provider.id2name(sid).should == account
end
it "should return the argument if it's already a name" do
- Puppet::Util::Windows::Security.expects(:valid_sid?).with(account).returns(false)
- Puppet::Util::Windows::Security.expects(:sid_to_name).never
+ Puppet::Util::Windows::SID.expects(:valid_sid?).with(account).returns(false)
+ Puppet::Util::Windows::SID.expects(:sid_to_name).never
provider.id2name(account).should == account
end
it "should return nil if the user doesn't exist" do
- Puppet::Util::Windows::Security.expects(:valid_sid?).with(sid).returns(true)
- Puppet::Util::Windows::Security.expects(:sid_to_name).with(sid).returns(nil)
+ Puppet::Util::Windows::SID.expects(:valid_sid?).with(sid).returns(true)
+ Puppet::Util::Windows::SID.expects(:sid_to_name).with(sid).returns(nil)
provider.id2name(sid).should == nil
end
@@ -72,7 +72,7 @@ describe Puppet::Type.type(:file).provider(:windows), :if => Puppet.features.mic
describe "#name2id" do
it "should delegate to name_to_sid" do
- Puppet::Util::Windows::Security.expects(:name_to_sid).with(account).returns(sid)
+ Puppet::Util::Windows::SID.expects(:name_to_sid).with(account).returns(sid)
provider.name2id(account).should == sid
end