TT#69200 Move hash argument to content method into a variable

This confuses perlritic, which consider this a pair of statements
separated by a comma.

Change-Id: I3c67c2fff03e5142a0dc284221dd0cc991ae052d
changes/17/35017/1
Guillem Jover 6 years ago
parent 9cca145beb
commit dbd7ac7e7a

@ -259,13 +259,15 @@ sub _create_subscriber {
sub _update_subscriber {
my ($subscriber,@further_opts) = @_;
my $content = {
%{$subscriber},
@further_opts
};
$req = HTTP::Request->new('PUT', $uri.'/api/subscribers/'.$subscriber->{id});
$req->header('Content-Type' => 'application/json');
$req->header('Prefer' => 'return=representation');
$req->content(JSON::to_json({
%$subscriber,
@further_opts,
}));
$req->content(JSON::to_json($content));
$res = $ua->request($req);
is($res->code, 200, "update test subscriber");
$subscriber = JSON::from_json($res->decoded_content);

Loading…
Cancel
Save