From c8b3799c88dd0ad3ce53a74634666f3b467651f4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 19 Mar 2020 12:04:27 -0300 Subject: [PATCH] Bug 24908: Unit tests --- t/db_dependent/api/v1/biblios.t | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t index 69de26d3dd..342b13b75f 100644 --- a/t/db_dependent/api/v1/biblios.t +++ b/t/db_dependent/api/v1/biblios.t @@ -37,7 +37,7 @@ my $t = Test::Mojo->new('Koha::REST::V1'); subtest 'get() tests' => sub { - plan tests => 18; + plan tests => 21; $schema->storage->txn_begin; @@ -67,7 +67,8 @@ subtest 'get() tests' => sub { ->json_is( [ "application/json", "application/marcxml+xml", "application/marc-in-json", - "application/marc" ] ); + "application/marc", + "text/plain" ] ); $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/json' } ) @@ -87,6 +88,11 @@ subtest 'get() tests' => sub { => { Accept => 'application/marc' } ) ->status_is(200); + $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber + => { Accept => 'text/plain' } ) + ->status_is(200) + ->content_is($biblio->metadata->record->as_formatted); + $biblio->delete; $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/marc' } ) -- 2.25.2