From 0c51f3ca7dbf71e5aa87a3d73b0acbf24063b256 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 10 Jan 2022 10:02:39 -0800 Subject: [PATCH] BuildDiff: make actual hash ref --- src/lib/Hydra/Helper/BuildDiff.pm | 4 ++-- t/Helper/BuildDiff.t | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/Hydra/Helper/BuildDiff.pm b/src/lib/Hydra/Helper/BuildDiff.pm index 7655bf4d..fb6e6543 100644 --- a/src/lib/Hydra/Helper/BuildDiff.pm +++ b/src/lib/Hydra/Helper/BuildDiff.pm @@ -18,7 +18,7 @@ use Data::Dumper; sub buildDiff { my ($builds, $builds2) = @_; - my $ret = [ + my $ret = { stillSucceed => [], stillFail => [], nowSucceed => [], @@ -28,7 +28,7 @@ sub buildDiff { unfinished => [], aborted => [], failed => [], - ]; + }; my $n = 0; foreach my $build (@{$builds}) { diff --git a/t/Helper/BuildDiff.t b/t/Helper/BuildDiff.t index 86bf3fba..35d7e8c2 100644 --- a/t/Helper/BuildDiff.t +++ b/t/Helper/BuildDiff.t @@ -9,7 +9,7 @@ my $ctx = test_context(); subtest "response" => sub { my $ret = buildDiff([], []); - is($ret, [ + is($ret, { stillSucceed => [], stillFail => [], nowSucceed => [], @@ -19,7 +19,7 @@ subtest "response" => sub { unfinished => [], aborted => [], failed => [], - ]); + }); }; is(1, 1);