Switch t/relationship/core.t $@ checks to Test::Exception
[dbsrgits/DBIx-Class.git] / t / 100extra_source.t
index 5c531fd..05d99b9 100644 (file)
@@ -12,7 +12,7 @@ use DBICTest;
     use base qw/DBIx::Class::ResultSource::Table/;
 }
 
-plan tests => 3;
+plan tests => 4;
 
 my $schema = DBICTest->init_schema();
 my $artist_source = $schema->source('Artist');
@@ -36,6 +36,12 @@ local $SIG{__WARN__} = sub { $warn = shift };
 }
 
 {
+  my $source = $schema->source('DBICTest::Artist');
+  $schema->register_source($source->source_name, $source);
+  is($warn, '', "re-registering an existing source under the same name causes no errors");
+}
+
+{
   my $new_source_name = 'Artist->preview(artist_preview)';
   $schema->register_source( $new_source_name => $new_source );