note("Meta key queries working with ${meta_key}. If the tests fail then check for it in the DB dumps");
note("Meta key queries working with ${meta_key}. If the tests fail then check for it in the DB dumps");
...
@@ -48,6 +48,9 @@ is(
...
@@ -48,6 +48,9 @@ is(
'Checking count of meta key is right with params'
'Checking count of meta key is right with params'
);
);
throws_ok{$helper->execute_single_result(-SQL=>'select * from meta')}qr/Too many results/,'More than 1 row causes an error';
throws_ok{$helper->execute_single_result(-SQL=>'select * from meta where species_id =?',-PARAMS=>[-1])}qr/No results/,'Less than 1 row causes an error';
is_deeply(
is_deeply(
$helper->execute(-SQL=>'select count(*), 3 from meta where meta_key =?',-PARAMS=>[$meta_key])->[0],
$helper->execute(-SQL=>'select count(*), 3 from meta where meta_key =?',-PARAMS=>[$meta_key])->[0],
[1,3],
[1,3],
...
@@ -70,7 +73,7 @@ is($meta_count_hash->{$meta_key}, 1, 'Checking hash comes back correctly');
...
@@ -70,7 +73,7 @@ is($meta_count_hash->{$meta_key}, 1, 'Checking hash comes back correctly');
);
);
my$expected_hash={
my$expected_hash={
'species.classification'=>[
'species.classification'=>[
qw(Hominidae Catarrhini Primates Eutheria Mammalia Vertebrata Chordata Metazoa Eukaryota)
'Homo sapiens',qw(Hominidae Catarrhini Primates Eutheria Mammalia Vertebrata Chordata Metazoa Eukaryota)