From aafdf344ba2741583fc8576fe4d9e736935bef04 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 18 Mar 2022 13:57:32 +0000 Subject: [PATCH] Bug 30275: Fix checkouts.t unit test We no longer require a mocked userenv for these tests to pass, we're setting the userenv in api auth now. The mock just serves to break tests for the renew method now that AddRenewal required a correctly set userenv for 'number'. Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/api/v1/checkouts.t | 2 -- 1 file changed, 2 deletions(-) diff --git a/t/db_dependent/api/v1/checkouts.t b/t/db_dependent/api/v1/checkouts.t index 404b2a7190..397baed5a0 100755 --- a/t/db_dependent/api/v1/checkouts.t +++ b/t/db_dependent/api/v1/checkouts.t @@ -59,8 +59,6 @@ my $unauth_userid = $patron->userid; my $patron_id = $patron->borrowernumber; my $branchcode = $builder->build({ source => 'Branch' })->{ branchcode }; -my $module = Test::MockModule->new('C4::Context'); -$module->mock('userenv', sub { { branch => $branchcode } }); $t->get_ok( "//$userid:$password@/api/v1/checkouts?patron_id=$patron_id" ) ->status_is(200) -- 2.20.1