CFINSPEC-266: Add resource_id & unit test: iis_site

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
Sonu Saha 2022-06-02 16:51:14 +05:30
parent f2943b7bc8
commit 4853077dfd
2 changed files with 5 additions and 0 deletions

View file

@ -77,6 +77,10 @@ module Inspec::Resources
iis_site.nil? ? false : (iis_site[:bindings].include? binding)
end
def resource_id
@site_name
end
def to_s
"iis_site '#{@site_name}'"
end

View file

@ -26,5 +26,6 @@ describe "Inspec::Resources::IisSite" do
_(resource.send("has_binding?", "https *:443:")).must_equal false
_(resource.send("has_binding?", "https :443:example.com sslFlags=0")).must_equal false
_(resource.send("to_s")).must_equal "iis_site 'Default Web Site'"
_(resource.send("resource_id")).must_equal "Default Web Site"
end
end