CatalystUtils::showJobName: write a basic test that shows it works

This commit is contained in:
Graham Christensen 2022-01-11 11:48:02 -05:00
parent ceb6ea252a
commit 2b163aa78b

View file

@ -4,6 +4,13 @@ use Setup;
use Test2::V0; use Test2::V0;
use Hydra::Helper::CatalystUtils; use Hydra::Helper::CatalystUtils;
my $ctx = test_context();
my $builds = $ctx->makeAndEvaluateJobset(
expression => "basic.nix",
build => 1
);
subtest "trim" => sub { subtest "trim" => sub {
my %values = ( my %values = (
"" => "", "" => "",
@ -25,4 +32,8 @@ subtest "trim" => sub {
is(trim($uninitialized), '', "Trimming an uninitialized value"); is(trim($uninitialized), '', "Trimming an uninitialized value");
}; };
subtest "showJobName" => sub {
ok(showJobName($builds->{"empty_dir"}), "showJobName succeeds");
};
done_testing; done_testing;