Lines 72-83
my $nopermission = $builder->build({
Link Here
|
72 |
}); |
72 |
}); |
73 |
my $nopermission_patron = Koha::Patrons->find($nopermission->{borrowernumber}); |
73 |
my $nopermission_patron = Koha::Patrons->find($nopermission->{borrowernumber}); |
74 |
|
74 |
|
75 |
my $session_nopermission = C4::Auth::get_session(''); |
75 |
my $session_nopermission = t::lib::Mocks::mock_session({borrower => $nopermission_patron}); |
76 |
$session_nopermission->param('number', $nopermission->{ borrowernumber }); |
|
|
77 |
$session_nopermission->param('id', $nopermission->{ userid }); |
78 |
$session_nopermission->param('ip', '127.0.0.1'); |
79 |
$session_nopermission->param('lasttime', time()); |
80 |
$session_nopermission->flush; |
81 |
|
76 |
|
82 |
my $borrower = Koha::Patrons->find($builder->build({ |
77 |
my $borrower = Koha::Patrons->find($builder->build({ |
83 |
source => 'Borrower', |
78 |
source => 'Borrower', |
Lines 131-154
my $borrower3 = Koha::Patrons->find($builder->build({
Link Here
|
131 |
my $borrowernumber3 = $borrower3->borrowernumber; |
126 |
my $borrowernumber3 = $borrower3->borrowernumber; |
132 |
|
127 |
|
133 |
# Get sessions |
128 |
# Get sessions |
134 |
my $session = C4::Auth::get_session(''); |
129 |
my $session = t::lib::Mocks::mock_session({borrower => $borrower}); |
135 |
$session->param('number', $borrower->borrowernumber); |
130 |
my $session2 = t::lib::Mocks::mock_session({borrower => $borrower2}); |
136 |
$session->param('id', $borrower->userid); |
131 |
my $session3 = t::lib::Mocks::mock_session({borrower => $borrower3}); |
137 |
$session->param('ip', '127.0.0.1'); |
|
|
138 |
$session->param('lasttime', time()); |
139 |
$session->flush; |
140 |
my $session2 = C4::Auth::get_session(''); |
141 |
$session2->param('number', $borrower2->borrowernumber); |
142 |
$session2->param('id', $borrower2->userid); |
143 |
$session2->param('ip', '127.0.0.1'); |
144 |
$session2->param('lasttime', time()); |
145 |
$session2->flush; |
146 |
my $session3 = C4::Auth::get_session(''); |
147 |
$session3->param('number', $borrower3->borrowernumber); |
148 |
$session3->param('id', $borrower3->userid); |
149 |
$session3->param('ip', '127.0.0.1'); |
150 |
$session3->param('lasttime', time()); |
151 |
$session3->flush; |
152 |
|
132 |
|
153 |
my $biblionumber = create_biblio('RESTful Web APIs'); |
133 |
my $biblionumber = create_biblio('RESTful Web APIs'); |
154 |
my $itemnumber = create_item($biblionumber, 'TEST000001'); |
134 |
my $itemnumber = create_item($biblionumber, 'TEST000001'); |