diff --git a/t/ui/27-plugin_obs_rsync_obs_status.t b/t/ui/27-plugin_obs_rsync_obs_status.t index 905a32593ece..b1917e5b8927 100644 --- a/t/ui/27-plugin_obs_rsync_obs_status.t +++ b/t/ui/27-plugin_obs_rsync_obs_status.t @@ -100,9 +100,7 @@ my $server_process = sub { my $www_authenticate = qq(Signature realm="Use your developer account",headers="(created)"); # uncoverable statement $mock->routes->get( '/build/ProjWithAuth/_result' => sub ($c) { - if ($c->req->headers->authorization) { - return $c->render(status => 200, text => $fake_response_by_project{Proj1}); - } + return $c->render(status => 200, text => $fake_response_by_project{Proj1}) if $c->req->headers->authorization; $c->res->headers->www_authenticate($www_authenticate); return $c->render(status => 401, text => 'login'); }); @@ -110,9 +108,7 @@ my $server_process = sub { $mock->routes->get( '/build/ProjTestingSignature/_result' => sub ($c) { my $client_auth_header = $c->req->headers->authorization // ''; - if ($auth_header_exact eq $client_auth_header) { - return $c->render(status => 200, text => $fake_response_by_project{Proj1}); - } + return $c->render(status => 200, text => $fake_response_by_project{Proj1}) if $auth_header_exact eq $client_auth_header; $c->res->headers->www_authenticate($www_authenticate); return $c->render(status => 401, text => 'login'); });