1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/usr/bin/perl
use strict;
use warnings;
use FindBin;
use lib "$FindBin::RealBin/../lib";
use Test::More tests => 2;
use Test::Exception;
use Bio::Chado::Schema::Test;
my $schema = Bio::Chado::Schema::Test->init_schema();
my $syn_table = $schema->resultset('Sequence::Synonym');
isa_ok( $syn_table, 'DBIx::Class::ResultSet' );
$schema->txn_do(sub{
# insert a feature with some sequence
my $cvterm = $schema->resultset('Cv::Cvterm')
->create_with({
name => 'tester',
cv => 'testing cv',
db => 'fake db',
dbxref => 'fake accession',
});
my $synonym = $syn_table->create({
name => 'foo',
type => $cvterm,
synonym_sgml => 'foo',
});
is( scalar( $synonym->features ), 0, 'feature mm works, returns 0' );
$schema->txn_rollback;
});
|