mirror of
https://github.com/inspec/inspec
synced 2024-11-22 12:43:07 +00:00
CFINSPEC-266: Add resource_id & unit test: iis_site
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
parent
f2943b7bc8
commit
4853077dfd
2 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue