summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-03-02 11:57:12 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2023-03-02 11:57:12 +0100
commit33c0d7957882883f88e3ef1affe8203f2bbc4dde (patch)
tree0b69107d6e97de5ee606f1336997f5c80ef69b82
parentd32477f82bca6042ddccd6bbce1cc804927a89a9 (diff)
fix pagination test
-rw-r--r--t/Helper.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/Helper.t b/t/Helper.t
index 45d0e4f..4578594 100644
--- a/t/Helper.t
+++ b/t/Helper.t
@@ -83,7 +83,7 @@ sub _to_perl_enc {
subtest 'pagination' => sub {
my %res;
- %res = JWebmail::Plugin::Helper::_paginate(first_item => 0, page_size => 10, total_items => 55);
+ %res = JWebmail::Plugin::Helper::_paginate(first_item => 0, page_size => 10, total_items => 55)->%*;
is $res{first_item}, 0;
is $res{last_item}, 9;
@@ -98,7 +98,7 @@ subtest 'pagination' => sub {
is_deeply $res{next_page}, [10, 20], 'next';
is_deeply $res{last_page}, [50, 55], 'last';
- %res = JWebmail::Plugin::Helper::_paginate(first_item => 10, page_size => 10, total_items => 55);
+ %res = JWebmail::Plugin::Helper::_paginate(first_item => 10, page_size => 10, total_items => 55)->%*;
is $res{first_item}, 10;
is $res{last_item}, 19;
@@ -113,7 +113,7 @@ subtest 'pagination' => sub {
is_deeply $res{next_page}, [20, 30], 'next';
is_deeply $res{last_page}, [50, 55], 'last';
- %res = JWebmail::Plugin::Helper::_paginate(first_item => 20, page_size => 10, total_items => 55);
+ %res = JWebmail::Plugin::Helper::_paginate(first_item => 20, page_size => 10, total_items => 55)->%*;
is $res{first_item}, 20;
is $res{last_item}, 29;
@@ -128,7 +128,7 @@ subtest 'pagination' => sub {
is_deeply $res{next_page}, [30, 40], 'next';
is_deeply $res{last_page}, [50, 55], 'last';
- %res = JWebmail::Plugin::Helper::_paginate(first_item => 50, page_size => 10, total_items => 55);
+ %res = JWebmail::Plugin::Helper::_paginate(first_item => 50, page_size => 10, total_items => 55)->%*;
is $res{first_item}, 50;
is $res{last_item}, 54;
@@ -143,7 +143,7 @@ subtest 'pagination' => sub {
is_deeply $res{next_page}, [50, 55], 'next';
is_deeply $res{last_page}, [50, 55], 'last';
- %res = JWebmail::Plugin::Helper::_paginate(first_item => 0, page_size => 10, total_items => 0);
+ %res = JWebmail::Plugin::Helper::_paginate(first_item => 0, page_size => 10, total_items => 0)->%*;
ok !defined $res{first_item};
ok !defined $res{last_item};
@@ -161,7 +161,7 @@ subtest 'pagination' => sub {
SKIP: {
skip 'The first_item does not align with page boundaries and behaiviour is not specified.';
- %res = JWebmail::Plugin::Helper::_paginate(first_item => 19, page_size => 10, total_items => 55);
+ %res = JWebmail::Plugin::Helper::_paginate(first_item => 19, page_size => 10, total_items => 55)->%*;
is $res{first_item}, 20;
is $res{last_item}, 29;