From: Dagfinn Ilmari Mannsåker Date: Wed, 16 Jul 2008 16:46:52 +0000 (+0000) Subject: Handle ResultSetManager deprecation warning in common tests X-Git-Tag: 0.04999_06~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2830a4934eb1af9742a756f80ae4cff80228134b;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Handle ResultSetManager deprecation warning in common tests --- diff --git a/Changes b/Changes index fd475e3..082411c 100644 --- a/Changes +++ b/Changes @@ -8,6 +8,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader directory if the user didn't specify one - Fix Oracle constraint and auto-increment detection for non-owned schemas (RT #35732) + - Handle ResultSetManager deprecation warning in common tests 0.04999_05 Mon Apr 14, 2008 - Fix limiting table list to the specified schema for DB2 diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 135d1a8..cd42be8 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -109,17 +109,22 @@ sub setup_schema { }; ok(!$@, "Loader initialization") or diag $@; + + my $warn_count = 2; + $warn_count++ if grep /ResultSetManager/, @loader_warnings; + if($self->{skip_rels}) { SKIP: { - is(scalar(@loader_warnings), 2, "No loader warnings") + is(scalar(@loader_warnings), $warn_count, "No loader warnings") or diag @loader_warnings; skip "No missing PK warnings without rels", 1; } } else { - is(scalar(@loader_warnings), 3, "Expected loader warning") + $warn_count++; + is(scalar(@loader_warnings), $warn_count, "Expected loader warning") or diag @loader_warnings; - like($loader_warnings[0], qr/loader_test9 has no primary key/i, + is(grep(/loader_test9 has no primary key/, @loader_warnings), 1, "Missing PK warning"); } }