Skip to content

Commit

Permalink
test(helper): add test for helper output
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptprivate authored Aug 28, 2024
1 parent 5ed29dd commit 2d7012a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/helper-output.t
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 2d7012a

Please sign in to comment.