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

(-)a/t/db_dependent/api/v1/holds.t (-3 / +4 lines)
Lines 43-50 my $builder = t::lib::TestBuilder->new(); Link Here
43
$schema->storage->txn_begin;
43
$schema->storage->txn_begin;
44
44
45
t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 );
45
t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 );
46
46
use t::lib::Mojo;
47
my $t = Test::Mojo->new('Koha::REST::V1');
47
my $t = t::lib::Mojo->new('Koha::REST::V1');
48
48
49
my $categorycode = $builder->build({ source => 'Category' })->{categorycode};
49
my $categorycode = $builder->build({ source => 'Category' })->{categorycode};
50
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode};
50
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode};
Lines 832-838 subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { Link Here
832
832
833
    $t->put_ok( "//$userid:$password@/api/v1/holds/"
833
    $t->put_ok( "//$userid:$password@/api/v1/holds/"
834
          . $hold->id
834
          . $hold->id
835
          . "/pickup_location" => json => $library_2->branchcode )->status_is(200)->json_is($library_2->branchcode);
835
          . "/pickup_location" => json => $library_2->branchcode )
836
      ->status_is(200)->json_is( $library_2->branchcode );
836
837
837
    is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'pickup library adjusted correctly' );
838
    is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'pickup library adjusted correctly' );
838
839
(-)a/t/lib/Mojo.pm (-1 / +12 lines)
Line 0 Link Here
0
- 
1
package t::lib::Mojo;
2
3
use base qw(Test::Mojo);
4
5
sub test {
6
    my ($self, @params) = @_;
7
    my $ok = $self->SUPER::test(@params);
8
    warn "DIAG: " . $self->tx->res->to_string unless $ok->success;
9
    return $ok
10
}
11
12
1;

Return to bug 27190