spec/solaris/commands_spec.rb in serverspec-0.2.26 vs spec/solaris/commands_spec.rb in serverspec-0.2.27

- old
+ new

@@ -235,5 +235,22 @@ }) } it { should eq "svcprop -p httpd/enable_64bit svc:/network/http:apache22 | grep -- \\^false\\$ && svcprop -p httpd/server_type svc:/network/http:apache22 | grep -- \\^worker\\$" } end +describe 'check_access_by_user', :os => :solaris do + context 'read access' do + subject {commands.check_access_by_user '/tmp/something', 'dummyuser1', 'r'} + it { should eq 'su dummyuser1 test -r /tmp/something' } + end + + context 'write access' do + subject {commands.check_access_by_user '/tmp/somethingw', 'dummyuser2', 'w'} + it { should eq 'su dummyuser2 test -w /tmp/somethingw' } + end + + context 'execute access' do + subject {commands.check_access_by_user '/tmp/somethingx', 'dummyuser3', 'x'} + it { should eq 'su dummyuser3 test -x /tmp/somethingx' } + end +end +