MODULES-4368: Add a test case for the issue

This commit is contained in:
Jan Vansteenkiste
2017-02-01 08:10:15 +01:00
parent 6605e34d71
commit 20960ddb7f

View File

@@ -29,6 +29,14 @@ describe Facter::Util::Fact do
end
end
end
context 'returns nil when readlink is present but java is not' do
it do
java_path_output = ""
Facter::Util::Resolution.expects(:which).with("readlink").returns(true)
Facter::Util::Resolution.expects(:exec).with("readlink -e /usr/bin/java").returns(java_path_output)
expect(Facter.value(:java_default_home)).to be_nil
end
end
context 'returns nil when readlink not present' do
it do