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

(-)a/t/db_dependent/api/v1/items.t (-2 / +8 lines)
Lines 256-262 subtest 'list_public() tests' => sub { Link Here
256
256
257
subtest 'get() tests' => sub {
257
subtest 'get() tests' => sub {
258
258
259
    plan tests => 30;
259
    plan tests => 34;
260
260
261
    $schema->storage->txn_begin;
261
    $schema->storage->txn_begin;
262
262
Lines 333-338 subtest 'get() tests' => sub { Link Here
333
      ->json_is( '/not_for_loan_status' => 0, 'not_for_loan_status is 0' )
333
      ->json_is( '/not_for_loan_status' => 0, 'not_for_loan_status is 0' )
334
      ->json_is( '/effective_not_for_loan_status' => 2, 'effective_not_for_loan_status now picks up itemtype level - item-level_itypes:1' );
334
      ->json_is( '/effective_not_for_loan_status' => 2, 'effective_not_for_loan_status now picks up itemtype level - item-level_itypes:1' );
335
335
336
    $itype->notforloan(undef)->store();
337
    $t->get_ok( "//$userid:$password@/api/v1/items/" . $item->itemnumber )->status_is( 200, 'SWAGGER3.2.2' )
338
        ->json_is( '/not_for_loan_status' => 0, 'not_for_loan_status is 0' )->json_is(
339
        '/effective_not_for_loan_status' => 0,
340
        'effective_not_for_loan_status now picks up itemtype level and falls back to 0 because undef'
341
        );
342
336
    t::lib::Mocks::mock_preference( 'item-level_itypes', 0 );
343
    t::lib::Mocks::mock_preference( 'item-level_itypes', 0 );
337
    $t->get_ok( "//$userid:$password@/api/v1/items/" . $item->itemnumber )
344
    $t->get_ok( "//$userid:$password@/api/v1/items/" . $item->itemnumber )
338
      ->status_is( 200, 'SWAGGER3.2.2' )
345
      ->status_is( 200, 'SWAGGER3.2.2' )
339
- 

Return to bug 35167