From: Brandon L. Black Date: Thu, 14 Sep 2006 17:34:22 +0000 (+0000) Subject: change warning check to death check (new storage exceptions) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8e1142ce623ef5bd83df069329327d47927b49d;p=dbsrgits%2FDBIx-Class-Historic.git change warning check to death check (new storage exceptions) --- diff --git a/t/19quotes.t b/t/19quotes.t index 65a7f3f..d2f5a8d 100644 --- a/t/19quotes.t +++ b/t/19quotes.t @@ -36,11 +36,8 @@ my $order = 'year DESC'; $rs = DBICTest::CD->search({}, { 'order_by' => \$order }); { - my $warnings = ''; - local $SIG{__WARN__} = sub { $warnings .= $_[0] }; - my $first = $rs->first(); - ok( $warnings !~ /ORDER BY terms/, - "No problem handling ORDER by scalaref" ); + eval { $rs->first() }; + ok(!$@, "No problem handling ORDER by scalaref" ); } DBICTest->schema->storage->sql_maker->quote_char([qw/[ ]/]); diff --git a/t/19quotes_newstyle.t b/t/19quotes_newstyle.t index 5bb0bc3..68f13a8 100644 --- a/t/19quotes_newstyle.t +++ b/t/19quotes_newstyle.t @@ -29,7 +29,7 @@ cmp_ok( $rs->count, '==', 1, "join with fields quoted"); $rs = DBICTest::CD->search({}, { 'order_by' => 'year DESC'}); { - eval{ $rs->first() }; + eval { $rs->first() }; like( $@, qr/ORDER BY terms/, "Problem with ORDER BY quotes" ); } @@ -37,11 +37,8 @@ my $order = 'year DESC'; $rs = DBICTest::CD->search({}, { 'order_by' => \$order }); { - my $warnings = ''; - local $SIG{__WARN__} = sub { $warnings .= $_[0] }; - my $first = $rs->first(); - ok( $warnings !~ /ORDER BY terms/, - "No problem handling ORDER by scalaref" ); + eval { $rs->first() }; + ok(!$@, "No problem handling ORDER by scalaref" ); } DBICTest->schema->connection($dsn, { quote_char => [qw/[ ]/], name_sep => '.' });