Lines 1806-1812
subtest 'put() tests' => sub {
Link Here
|
1806 |
|
1806 |
|
1807 |
subtest 'list() tests' => sub { |
1807 |
subtest 'list() tests' => sub { |
1808 |
|
1808 |
|
1809 |
plan tests => 17; |
1809 |
plan tests => 20; |
1810 |
|
1810 |
|
1811 |
$schema->storage->txn_begin; |
1811 |
$schema->storage->txn_begin; |
1812 |
|
1812 |
|
Lines 1871-1876
subtest 'list() tests' => sub {
Link Here
|
1871 |
$biblio->biblioitem->set( { isbn => 'TOMAS' } )->store; |
1871 |
$biblio->biblioitem->set( { isbn => 'TOMAS' } )->store; |
1872 |
$t->get_ok( "//$userid:$password@/api/v1/biblios?q=$isbn_query" => { Accept => 'text/plain' } )->status_is(200); |
1872 |
$t->get_ok( "//$userid:$password@/api/v1/biblios?q=$isbn_query" => { Accept => 'text/plain' } )->status_is(200); |
1873 |
|
1873 |
|
|
|
1874 |
my $fixed_date = dt_from_string("2017-01-01 01:00:00"); |
1875 |
my $next_day = $fixed_date->clone->add( days => 1 ); |
1876 |
|
1877 |
# bug 39397 |
1878 |
$biblio->timestamp($fixed_date)->store(); |
1879 |
$biblio->biblioitem->timestamp($next_day)->store(); |
1880 |
|
1881 |
$query = encode_json( { biblio_id => $biblio->id } ); |
1882 |
|
1883 |
$t->get_ok( "//$userid:$password@/api/v1/biblios?q=$query" => { Accept => 'application/json' } )->status_is(200) |
1884 |
->json_is( '/0/timestamp' => |
1885 |
output_pref( { dt => $fixed_date, dateformat => 'rfc3339' }, 'biblio table timestamp takes precedence' ) ); |
1886 |
|
1874 |
$schema->storage->txn_rollback; |
1887 |
$schema->storage->txn_rollback; |
1875 |
}; |
1888 |
}; |
1876 |
|
1889 |
|
1877 |
- |
|
|