From 2d7012abc3eae1e9e71194f291f013345711ae14 Mon Sep 17 00:00:00 2001 From: priv <140729444+scriptprivate@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:24:57 -0300 Subject: [PATCH] test(helper): add test for helper output --- tests/helper-output.t | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/helper-output.t diff --git a/tests/helper-output.t b/tests/helper-output.t new file mode 100644 index 0000000..70443e4 --- /dev/null +++ b/tests/helper-output.t @@ -0,0 +1,21 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; +use Test::Exception; +use lib '../lib'; +use SecurityGate::Utils::Helper; + +subtest 'Helper output' => sub { + my $helper_output = SecurityGate::Utils::Helper->new(); + + like($helper_output, qr/Security\ Gate\ v0\.0\.3/x, 'Helper output contains version'); + like($helper_output, qr/-t,\ --token/x, 'Helper output contains token option'); + like($helper_output, qr/-r,\ --repo/x, 'Helper output contains repo option'); + like($helper_output, qr/--dependency-alerts/x, 'Helper output contains dependency alerts option'); + like($helper_output, qr/--secret-scanning-alerts/x, 'Helper output contains secret scanning alerts option'); + like($helper_output, qr/--code-scanning-alerts/x, 'Helper output contains code scanning alerts option'); +}; + +done_testing();