X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frelationship%2Finfo.t;h=a56f4775a17dd24d43cca7519770313d32321077;hb=refs%2Fheads%2Fbelongs_to_renaming;hp=4f349d45e6733052f6e659ceca7354b7e8186f97;hpb=5d22bb74b308ad7ca28cedd1ffcfd92c106b1e68;p=dbsrgits%2FDBIx-Class.git diff --git a/t/relationship/info.t b/t/relationship/info.t index 4f349d4..a56f477 100644 --- a/t/relationship/info.t +++ b/t/relationship/info.t @@ -17,7 +17,7 @@ use DBICTest; __PACKAGE__->add_columns(qw/id ancestor_id/); __PACKAGE__->set_primary_key('id'); __PACKAGE__->has_many(children => __PACKAGE__, 'id'); - __PACKAGE__->belongs_to(parent => __PACKAGE__, 'id', { join_type => 'left' } ); + __PACKAGE__->refers_to(parent => __PACKAGE__, 'id', { join_type => 'left' } ); __PACKAGE__->has_many(subthings => 'DBICTest::SubThing', 'thing_id'); } @@ -29,8 +29,8 @@ use DBICTest; use base qw/DBIx::Class::Core/; __PACKAGE__->table('subthing'); __PACKAGE__->add_columns(qw/thing_id/); - __PACKAGE__->belongs_to(thing => 'DBICTest::Thing', 'thing_id'); - __PACKAGE__->belongs_to(thing2 => 'DBICTest::Thing', 'thing_id', { join_type => 'left' } ); + __PACKAGE__->refers_to(thing => 'DBICTest::Thing', 'thing_id'); + __PACKAGE__->refers_to(thing2 => 'DBICTest::Thing', 'thing_id', { join_type => 'left' } ); } my $schema = DBICTest->init_schema; @@ -62,12 +62,12 @@ for my $without_schema (1,0) { is_deeply( _instance($s)->reverse_relationship_info('thing'), { subthings => $t->relationship_info('subthings') }, - 'reverse_rel_info works cross-class belongs_to direction', + 'reverse_rel_info works cross-class refers_to direction', ); is_deeply( _instance($s)->reverse_relationship_info('thing2'), { subthings => $t->relationship_info('subthings') }, - 'reverse_rel_info works cross-class belongs_to direction 2', + 'reverse_rel_info works cross-class refers_to direction 2', ); is_deeply( @@ -79,7 +79,7 @@ for my $without_schema (1,0) { is_deeply( _instance($t)->reverse_relationship_info('parent'), { children => $t->relationship_info('children') }, - 'reverse_rel_info works in-class belongs_to direction', + 'reverse_rel_info works in-class refers_to direction', ); is_deeply( _instance($t)->reverse_relationship_info('children'),