add tests for users with sid on windows

This commit is contained in:
Christoph Hartmann 2016-08-26 09:40:24 +02:00
parent dd06709d6e
commit efb2e08a16
2 changed files with 3 additions and 0 deletions

View file

@ -76,6 +76,8 @@ end
if os.windows?
describe user(userinfo[:name]) do
it { should exist }
# should return the SID of the user
its('uid') { should_not eq nil}
end
else
describe user(userinfo[:name]) do

View file

@ -100,6 +100,7 @@ describe 'Inspec::Resources::User' do
it 'read user on Windows' do
resource = MockLoader.new(:windows).load_resource('user', 'example/Administrator')
_(resource.uid).wont_be_nil
_(resource.exists?).must_equal true
_(resource.group).must_equal nil
_(resource.groups).must_equal ['WIN-K0AKLED332V\\Administrators', 'EXAMPLE\\Domain Admins']