From b49f926f6da0827f72bbc3ef4f2e188f31d2ebee Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 6 May 2025 20:29:39 +0200 Subject: [PATCH] MT#62763 Replace code being tested from test description string with "creating" The other test cases do not inline the code they are testing, which is prone to get out of sync, and trips over perlcritic. Warned-by: perlcritic Fixes: ValuesAndExpressions::ProhibitImplicitNewlines Change-Id: Id7757dfa6a982446407a3db61b7af015f31c3800 --- t/api-rest/api-contracts-collection.t | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/t/api-rest/api-contracts-collection.t b/t/api-rest/api-contracts-collection.t index 900e70944f..55e3c19ab0 100644 --- a/t/api-rest/api-contracts-collection.t +++ b/t/api-rest/api-contracts-collection.t @@ -121,11 +121,7 @@ $data->{billing_profiles} = [map { { $test_machine->http_code_msg(200,"Check that we can PUT contracts if there aren't prepaid billing ptofiles", $res, $content); ($res,$content) = $test_machine->request_patch( [ { op => 'replace', path => '/billing_profile_id', value => $bp_no_prepaid->{content}->{id} } ] ); -$test_machine->http_code_msg(200,"Check that we can $data->{billing_profiles} = [{'profile_id' => $bp_no_prepaid->{content}->{id}}, map { { - 'profile_id' => $_->{content}->{id}, - 'start' => $dtf->format_datetime($now->add( days => Test::FakeData::seq)), - 'stop' => $dtf->format_datetime($now->add( days => Test::FakeData::seq)), - } } @$bps_prepaid, @$bps_no_prepaid ]; contracts if there aren't prepaid billing ptofiles", $res, $content); +$test_machine->http_code_msg(200,"Check that we can create contracts if there aren't prepaid billing ptofiles", $res, $content); $data = clone $test_machine->DATA_ITEM; $data->{billing_profile_id} = $bp_no_prepaid->{content}->{id};