@@ -, +, @@ --------- DELETE FROM auth_header WHERE marcxml LIKE '%datafield tag="2%'; -- Now the test should blow up nicely. -- If you find you have no records, add more such that you repeat steps 2 and 3 and still have records in auth_header. Sorry, getting the trigger data is the hard part. -- should barf before running all the tests -- should have pretty skip message(s) --- t/db_dependent/Linker_FirstMatch.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/t/db_dependent/Linker_FirstMatch.t +++ a/t/db_dependent/Linker_FirstMatch.t @@ -18,7 +18,15 @@ BEGIN { } my $dbh = C4::Context->dbh; -my $query = "SELECT authid, marc FROM auth_header LIMIT 1;"; +my $where_clause = ' WHERE marcxml LIKE \'%datafield tag="'; +if (C4::Context->preference('MARCFlavour') eq 'UNIMARC') { + $where_clause .= '2%\''; +} else { + $where_clause .= '1%\''; +} + +my $query = "SELECT authid, marc FROM auth_header "; +$query .= $where_clause; my $sth = $dbh->prepare($query); $sth->execute(); my ($authid, $marc) = $sth->fetchrow_array(); --