use lib 't/lib';
-plan tests => 4;
+plan tests => 6;
sub _chk_warning {
defined $_[0]?
1
}
+sub _chk_extra_sources_warning {
+ my $p = qr/already has a source, use register_extra_source for additional sources/;
+ defined $_[0]? $_[0] !~ /$p/ : 1;
+}
+
my $warnings;
eval {
local $SIG{__WARN__} = sub { $warnings .= shift };
);
};
ok(!$@) or diag $@;
-ok(_chk_warning($warnings), 'expected no complaint');
+ok(_chk_warning($warnings), 'expected no resultset complaint');
+ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint');
+undef $warnings;
eval {
local $SIG{__WARN__} = sub { $warnings .= shift };
);
};
ok(!$@) or diag $@;
-ok(_chk_warning($warnings), 'expected no complaint') or diag $warnings;
+ok(_chk_warning($warnings), 'expected no resultset complaint') or diag $warnings;
+ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint');
+undef $warnings;