test case added for file resource when it does not exist

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
This commit is contained in:
Nikita Mathur 2021-05-17 14:02:26 +05:30
parent 483853ab81
commit 8403780995

View file

@ -104,4 +104,9 @@ describe Inspec::Resources::FileResource do
_(proc { resource.send(:more_permissive_than?, "0888") }).must_raise(ArgumentError)
end
it "when file does not exist" do
resource = MockLoader.new(:ubuntu1404).load_resource("file", "file_does_not_exist")
assert_nil(resource.send(:more_permissive_than?, nil))
end
end