Added test for check_access_lock_dir

This commit is contained in:
mansimarkaur 2017-04-03 07:06:59 +05:30
parent 8ea778f7c7
commit fda41919cf

View File

@ -41,6 +41,18 @@ describe Homebrew::Diagnostic::Checks do
end
end
specify "#check_access_lock_dir" do
begin
mode = HOMEBREW_LOCK_DIR.stat.mode & 0777
HOMEBREW_LOCK_DIR.chmod 0555
expect(subject.check_access_logs)
.to match("#{HOMEBREW_LOCK_DIR} isn't writable.")
ensure
HOMEBREW_LOCK_DIR.chmod mode
end
end
specify "#check_access_logs" do
begin
mode = HOMEBREW_LOGS.stat.mode & 0777