### ----------------------------------------------------
### -- UpRooted
### -- Licenses: Artistic-2.0
### -- Authors: Paweł bbkr Pabian
### -- File: t/20-tree.rakutest
### ----------------------------------------------------
### -- Chunk 2 of 2
columns( 'c1' ),
        child-columns => $schema.table( 't2' ).columns( 'c2' ),
        name => 'r2'
    );
    
    my $tree = UpRooted::Tree.new( root-table => $schema.table( 't1' ) );
    is $tree.paths[1].relations[0], $r2, 'Blocked UpRooted::Relation not used';
    
    $r2.is-blocked = True;
    $tree = UpRooted::Tree.new( root-table => $schema.table( 't1' ) );
    is-deeply path-to-tables( $tree ), [ [ 't1' ], ], 'UpRooted::Table not used because all UpRooted::Relations leading to it were blocked';
    
}


