From: Toby Corkindale Date: Thu, 11 Jun 2009 06:49:56 +0000 (+0000) Subject: Re-register the source (after the added relationship), as this makes the test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a5fdd2cfa54a97d1811dd984d6aabcf4c796fe9c;p=dbsrgits%2FDBIx-Class-Historic.git Re-register the source (after the added relationship), as this makes the test pass, and is apparently the Right Thing To Do. (See mailing list 09/06/2009) --- diff --git a/t/relationship/afterthought.t b/t/relationship/afterthought.t index fb2bd82..f4942a3 100644 --- a/t/relationship/afterthought.t +++ b/t/relationship/afterthought.t @@ -20,6 +20,11 @@ my @previous_rels = sort $schema->source('Artist')->relationships; my $class = $schema->class('Artist'); $class->belongs_to('rank' => $schema->class('Lyrics')); +# Re-register the source: +$schema->register_extra_source( + Artist => $schema->class('Artist')->new->result_source_instance +); + # Now check we have the relationship: my $source = $schema->source('Artist');