Skip Menu |
 

This queue is for tickets about the DBIx-Class-ResultSet-WithMetaData CPAN distribution.

Report information
The Basics
Id: 104602
Status: new
Priority: 0/
Queue: DBIx-Class-ResultSet-WithMetaData

People
Owner: Nobody in particular
Requestors: TIMB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments
0001-Fixup-test-to-work-with-DBD-SQLite-1.38_03.patch



Subject: Tests fail with DBD::SQLite 1.38_03+ [PATCH]
Download (untitled) / with headers
text/plain 362b
t/custom_methods.t .. 1/? # Failed test 'substring before prefetch okay' # at t/custom_methods.t line 142. # Structures begin differing at: # $got->[0]{cds}[1]{cdid} = '2' # $expected->[0]{cds}[1]{cdid} = '1' # Looks like you failed 1 test of 7. t/custom_methods.t .. Dubious, test returned 1 (wstat 256, 0x100) The attached patch fixes it.
Subject: 0001-Fixup-test-to-work-with-DBD-SQLite-1.38_03.patch
From c00a2f714787390b2a261cbc69104e9150109cce Mon Sep 17 00:00:00 2001 From: Tim Bunce <tim@tigerlms.com> Date: Thu, 21 May 2015 13:32:01 +0000 Subject: [PATCH] Fixup test to work with DBD::SQLite 1.38_03+ --- t/custom_methods.t | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/t/custom_methods.t b/t/custom_methods.t index 43a3ae4..0316b77 100644 --- a/t/custom_methods.t +++ b/t/custom_methods.t @@ -138,18 +138,16 @@ ok(my $schema = DBICTest->init_schema(), 'got schema'); # } { - my $artists = $schema->resultset('Artist')->search({}, { order_by => 'artistid' })->with_substr_key->search({}, { prefetch => 'cds', rows => 1 })->display(); + my $artists = $schema->resultset('Artist') + ->search({}, { order_by => 'artistid' }) + ->with_substr_key + ->search({}, { prefetch => 'cds', rows => 1, order_by => { -asc => 'cds.cdid' } }) + ->display(); is_deeply($artists, [ { 'artistid' => 1, 'cds' => [ { - 'cdid' => 3, - 'artist' => 1, - 'title' => 'Caterwaulin\' Blues', - 'year' => '1997' - }, - { 'cdid' => 1, 'artist' => 1, 'title' => 'Spoonful of bees', @@ -160,7 +158,13 @@ ok(my $schema = DBICTest->init_schema(), 'got schema'); 'artist' => 1, 'title' => 'Forkful of bees', 'year' => '2001' - } + }, + { + 'cdid' => 3, + 'artist' => 1, + 'title' => 'Caterwaulin\' Blues', + 'year' => '1997' + }, ], 'name' => 'Caterwauler McCrae', 'substr' => 'Cat' -- 2.1.2


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.