mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
add tests for users with sid on windows
This commit is contained in:
parent
dd06709d6e
commit
efb2e08a16
2 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue