]> 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)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Wed, 9 Dec 2020 21:54:46 +0000 (21:54 +0000)
commit8293c73bacb55dda87025a7986019754e490fa25
tree47c517552fd9110f2a76aaea07038c8dc82f3854
parent06968cb76f39e85586cc2d018bed83796b32d2da
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>
(cherry picked from commit 3376a9440050d795ce0738e20b0616b782143f4b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
t/db_dependent/Koha/Item.t