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 |
|