CFINSPEC-89: Add unit test for have_gid matcher

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
Sonu Saha 2022-04-13 16:53:42 +05:30
parent 2f7c65d1a4
commit a8aa8f4b29

View file

@ -130,4 +130,16 @@ describe "Inspec::Resources::Group" do
_(resource.exists?).must_equal true
_(resource.members).must_equal ""
end
# ubuntu
it "verify have_gid matcher on ubuntu" do
resource = MockLoader.new(:ubuntu).load_resource("group", "root")
_(resource.has_gid?(0)).must_equal true
end
# freebsd
it "verify have_gid matcher on freebsd" do
resource = MockLoader.new(:freebsd10).load_resource("group", "root")
_(resource.has_gid?(0)).must_equal true
end
end