diff --git a/t/api-all-links.t b/t/api-all-links.t index c5e225fb0a..d0f728e586 100644 --- a/t/api-all-links.t +++ b/t/api-all-links.t @@ -47,7 +47,7 @@ $ua->ssl_opts( my $opts = JSON::from_json($res->decoded_content); ok(exists $opts->{methods}, "OPTIONS should return methods"); is(ref $opts->{methods}, "ARRAY", "OPTIONS methods should be array"); - if ("GET" ~~ $opts->{methods}) { + if (grep {$_ eq "GET"} @{ $opts->{methods} }) { # skip calllists collection, as it needs a subscriber_id parameter also in the collection next if $relname eq "calllists"; $req = HTTP::Request->new('GET', "$uri/api/$relname/"); diff --git a/t/api-balanceintervals.t b/t/api-balanceintervals.t index 0839c3e294..76edbfe181 100644 --- a/t/api-balanceintervals.t +++ b/t/api-balanceintervals.t @@ -712,7 +712,7 @@ if (_get_allow_fake_client_time() && $enable_profile_packages) { delete $fetched->{content}; is_deeply($interval,$fetched,"balanceintervals root collection: compare fetched and embedded item deeply"); } - ok((scalar keys $page_items) == 0,"balanceintervals root collection: check if all embedded items are linked"); + ok((scalar keys %{ $page_items }) == 0,"balanceintervals root collection: check if all embedded items are linked"); } while($nexturi); diff --git a/t/api-journals.t b/t/api-journals.t index c44c7feef1..29b4324bc4 100644 --- a/t/api-journals.t +++ b/t/api-journals.t @@ -2455,11 +2455,11 @@ sub _test_journal_collection { delete $original->{content}; is_deeply($original,$journal,"compare created and embedded journal item deeply"); } - ok((scalar keys $page_journals) == 0,"check if all embedded journal items are linked"); + ok((scalar keys %{ $page_journals }) == 0,"check if all embedded journal items are linked"); } while($nexturi); - ok((scalar keys %$journals) == 0,"check if journal collection lists all created journal items" . (defined $total_count ? " ($total_count)" : '')); + ok((scalar keys %{ $journals }) == 0,"check if journal collection lists all created journal items" . (defined $total_count ? " ($total_count)" : '')); } }