]> git.koha-community.org Git - koha.git/commit
Bug 27007: Don't call GetMarcSubfieldStructure with unsafe in tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Nov 2020 08:32:50 +0000 (09:32 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 20 Nov 2020 09:34:54 +0000 (10:34 +0100)
commit3376a9440050d795ce0738e20b0616b782143f4b
treedf2d153ceb2a637bfd840694269f9b67c4227ee3
parent1aeeaf4c2b6f4c8f79e2472b7c66a832d0daf802
Bug 27007: Don't call GetMarcSubfieldStructure with unsafe in tests

It does not feel correct to call GetMarcSubfieldStructure with the unsafe flag set in tests:
   my $mss = C4::Biblio::GetMarcSubfieldStructure( '', { unsafe => 1 } );

Some tests are failing is run twice

Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
[x~10]
Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.

    #   Failed test 'Value is mapped correctly for column biblionumber'
    #   at t/db_dependent/Koha/Item.t line 115.
    #          got: undef
    #     expected: '483'
[etc.]

Test plan:
Run the tests twice, without the patch it fails, with the patch it
passes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Koha/Item.t