[Bast-commits] r7460 -
DBIx-Class/0.08/branches/pg_unqualified_schema/t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Sep 1 11:34:59 GMT 2009
Author: ribasushi
Date: 2009-09-01 11:34:59 +0000 (Tue, 01 Sep 2009)
New Revision: 7460
Modified:
DBIx-Class/0.08/branches/pg_unqualified_schema/t/72pg.t
Log:
Rewrap todo properly
Modified: DBIx-Class/0.08/branches/pg_unqualified_schema/t/72pg.t
===================================================================
--- DBIx-Class/0.08/branches/pg_unqualified_schema/t/72pg.t 2009-09-01 11:01:31 UTC (rev 7459)
+++ DBIx-Class/0.08/branches/pg_unqualified_schema/t/72pg.t 2009-09-01 11:34:59 UTC (rev 7460)
@@ -186,33 +186,36 @@
[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';
+ 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} || '<none>');
+ } "$sch_name liid 1 did not die"
+ or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || '<none>');
- 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} || '<none>');
- } "$sch_name liid 1 did not die"
- or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || '<none>');
- 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} || '<none>');
- } "$sch_name liid 2 did not die"
- or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || '<none>');
+ 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} || '<none>');
+ } "$sch_name liid 2 did not die"
+ or diag "USED SEQUENCE: ".($schema->source('Artist')->column_info('artistid')->{sequence} || '<none>');
+ }
+ },
+ [ (qr/guessing sequence/)x2],
+ 'got a bunch of warnings from unqualified schema guessing'
+ );
+ }
- }
- }
- } [ (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);
}
More information about the Bast-commits
mailing list