From: Peter Rabbitson Date: Tue, 1 Sep 2009 11:34:59 +0000 (+0000) Subject: Rewrap todo properly X-Git-Tag: v0.08111~14^2~36 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=3bf6e27cd039f60882b2868930d989d292136377 Rewrap todo properly --- diff --git a/t/72pg.t b/t/72pg.t index 39d7d5a..9f2df92 100644 --- a/t/72pg.t +++ b/t/72pg.t @@ -186,32 +186,35 @@ cmp_ok( $schema->resultset('Artist')->count, '==', 0, 'this should start with an [qw| unq_nextval_schema 2 |], [qw| unq_nextval_schema2 1 |], ); - warnings_exist { - TODO: { - local $TODO = 'have not figured out a 100% reliable way to tell which schema an unqualified seq is in'; - - foreach my $t ( @todo_schemas ) { - my ($sch_name, $start_num) = @$t; - #test with anothertestschema - $schema->source('Artist')->name("$sch_name.artist"); - $schema->source('Artist')->column_info('artistid')->{sequence} = undef; #< clear sequence name cache - my $another_new; - lives_ok { - $another_new = $schema->resultset('Artist')->create({ name => 'Tollbooth Willy'}); - is( $another_new->artistid,$start_num, "got correct artistid for $sch_name") - or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); - } "$sch_name liid 1 did not die" - or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); - lives_ok { - $another_new = $schema->resultset('Artist')->create({ name => 'Adam Sandler'}); - is( $another_new->artistid,$start_num+1, "got correct artistid for $sch_name") - or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); - } "$sch_name liid 2 did not die" - or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); - - } - } - } [ (qr/guessing sequence/)x2], 'got a bunch of warnings from unqualified schema guessing'; + TODO: { + local $TODO = 'have not figured out a 100% reliable way to tell which schema an unqualified seq is in'; + warnings_exist ( + sub { + foreach my $t ( @todo_schemas ) { + my ($sch_name, $start_num) = @$t; + #test with anothertestschema + $schema->source('Artist')->name("$sch_name.artist"); + $schema->source('Artist')->column_info('artistid')->{sequence} = undef; #< clear sequence name cache + my $another_new; + lives_ok { + $another_new = $schema->resultset('Artist')->create({ name => 'Tollbooth Willy'}); + is( $another_new->artistid,$start_num, "got correct artistid for $sch_name") + or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); + } "$sch_name liid 1 did not die" + or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); + + lives_ok { + $another_new = $schema->resultset('Artist')->create({ name => 'Adam Sandler'}); + is( $another_new->artistid,$start_num+1, "got correct artistid for $sch_name") + or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); + } "$sch_name liid 2 did not die" + or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || ''); + } + }, + [ (qr/guessing sequence/)x2], + 'got a bunch of warnings from unqualified schema guessing' + ); + } $schema->source('Artist')->column_info('artistid')->{sequence} = undef; #< clear sequence name cache $schema->source("Artist")->name($artist_name_save);