DBIx-Class-Smooth
    
    
  
  
  
view release on metacpan or search on metacpan
t/02-schema-helper-row-definition.t view on Meta::CPAN
isa_ok $schema, 'DBIx::Class::Schema';
my $relationships = [sort $schema->Book->result_source->relationships];
is_deeply ($relationships, [sort qw/editions book_authors/], 'Books relationships') or diag explain $relationships;
my $relationship_info = $schema->Book->result_source->relationship_info('editions');
my $expected_relationship_info = {
    'attrs' => {
        'accessor' => 'multi',
        'cascade_copy' => 1,
        'cascade_delete' => 1,
        'is_depends_on' => 0,
        'join_type' => 'LEFT'
    },
    'class' => 'TestFor::DBIx::Class::Smooth::Schema::Result::Edition',
    'cond' => {
        'foreign.book_id' => 'self.id'
    },
    'source' => 'TestFor::DBIx::Class::Smooth::Schema::Result::Edition'
};
is_deeply ($relationship_info, $expected_relationship_info, 'Got expected relationship info') or diag explain $relationship_info;
( run in 0.294 second using v1.01-cache-2.11-cpan-c333fce770f )