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

(-)a/t/db_dependent/api/v1/biblios.t (-4 / +32 lines)
Lines 1617-1623 subtest 'put() tests' => sub { Link Here
1617
1617
1618
subtest 'list() tests' => sub {
1618
subtest 'list() tests' => sub {
1619
1619
1620
    plan tests => 15;
1620
    plan tests => 26;
1621
1621
1622
    $schema->storage->txn_begin;
1622
    $schema->storage->txn_begin;
1623
1623
Lines 1649-1655 subtest 'list() tests' => sub { Link Here
1649
    my $biblionumber1 = $biblio->biblionumber;
1649
    my $biblionumber1 = $biblio->biblionumber;
1650
1650
1651
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
1651
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
1652
    my $biblionumber2 = $builder->build_sample_biblio->biblionumber;
1652
    my $biblio2 = $builder->build_sample_biblio;
1653
    my $biblionumber2 = $biblio2->biblionumber;
1653
1654
1654
    my $search =
1655
    my $search =
1655
"[{\"biblionumber\": \"$biblionumber1\"}, {\"biblionumber\": \"$biblionumber2\"}]";
1656
"[{\"biblionumber\": \"$biblionumber1\"}, {\"biblionumber\": \"$biblionumber2\"}]";
Lines 1686-1691 subtest 'list() tests' => sub { Link Here
1686
          { Accept => 'text/plain', 'x-koha-query' => $search } )
1687
          { Accept => 'text/plain', 'x-koha-query' => $search } )
1687
      ->status_is(200);
1688
      ->status_is(200);
1688
1689
1690
    $biblio->delete;
1691
    $biblio2->delete;
1692
1693
    $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" =>
1694
          { Accept => 'application/json', 'x-koha-query' => $search } )
1695
      ->status_is(200);
1696
1697
    $result = $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" =>
1698
          { Accept => 'application/marcxml+xml', 'x-koha-query' => $search } )
1699
      ->status_is(200)->tx->res->body;
1700
1701
    $encoded_title  = Encode::encode( "UTF-8", $title_with_diacritics );
1702
    like( $result, qr/\Q$encoded_title/, "The title is not double encoded" );
1703
1704
    $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" =>
1705
          { Accept => 'application/marc-in-json', 'x-koha-query' => $search } )
1706
      ->status_is(200);
1707
1708
    $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" =>
1709
          { Accept => 'application/marc', 'x-koha-query' => $search } )
1710
      ->status_is(200);
1711
1712
    $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" =>
1713
          { Accept => 'text/plain', 'x-koha-query' => $search } )
1714
      ->status_is(200);
1715
1716
1717
1689
    $schema->storage->txn_rollback;
1718
    $schema->storage->txn_rollback;
1690
};
1719
};
1691
1720
Lines 1801-1804 subtest 'update_item() tests' => sub { Link Here
1801
    ->json_is('/replacement_price', 30);
1830
    ->json_is('/replacement_price', 30);
1802
1831
1803
  $schema->storage->txn_rollback;
1832
  $schema->storage->txn_rollback;
1804
};
1833
};
1805
- 

Return to bug 33960