View | Details | Raw Unified | Return to bug 24543
Collapse All | Expand All

(-)a/t/db_dependent/api/v1/checkouts.t (-9 / +8 lines)
Lines 71-76 $t->get_ok( "//$userid:$password@/api/v1/checkouts?patron_id=$notexisting_patron Link Here
71
  ->status_is(200)
71
  ->status_is(200)
72
  ->json_is([]);
72
  ->json_is([]);
73
73
74
$dbh->do('DELETE FROM issuingrules');
75
$dbh->do(q{
76
    INSERT INTO issuingrules (categorycode, branchcode, itemtype, renewalperiod, renewalsallowed, issuelength)
77
    VALUES (?, ?, ?, ?, ?, ?)
78
}, {}, '*', '*', '*', 7, 1, 5);
79
74
my $item1 = $builder->build_sample_item;
80
my $item1 = $builder->build_sample_item;
75
my $item2 = $builder->build_sample_item;
81
my $item2 = $builder->build_sample_item;
76
my $item3 = $builder->build_sample_item;
82
my $item3 = $builder->build_sample_item;
Lines 168-182 $t->get_ok( "//$userid:$password@/api/v1/checkouts/" . $issue2->issue_id) Link Here
168
  ->json_is('/due_date' => output_pref( { dateformat => "rfc3339", dt => $date_due2 }) );
174
  ->json_is('/due_date' => output_pref( { dateformat => "rfc3339", dt => $date_due2 }) );
169
175
170
176
171
$dbh->do('DELETE FROM issuingrules');
177
my $expected_datedue = $date_due
172
$dbh->do(q{
173
    INSERT INTO issuingrules (categorycode, branchcode, itemtype, renewalperiod, renewalsallowed)
174
    VALUES (?, ?, ?, ?, ?)
175
}, {}, '*', '*', '*', 7, 1);
176
177
my $expected_datedue = DateTime->now
178
    ->set_time_zone('local')
178
    ->set_time_zone('local')
179
    ->add(days => 14)
179
    ->add(days => 7)
180
    ->set(hour => 23, minute => 59, second => 0);
180
    ->set(hour => 23, minute => 59, second => 0);
181
$t->post_ok ( "//$userid:$password@/api/v1/checkouts/" . $issue1->issue_id . "/renewal" )
181
$t->post_ok ( "//$userid:$password@/api/v1/checkouts/" . $issue1->issue_id . "/renewal" )
182
  ->status_is(201)
182
  ->status_is(201)
183
- 

Return to bug 24543