Skip to content
Snippets Groups Projects
Commit 373aec50 authored by Alistair Rust's avatar Alistair Rust
Browse files

Tests for new update method.

parent dec43aab
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ use warnings;
BEGIN { $| = 1;
use Test;
plan tests => 33;
plan tests => 37;
}
use MultiTestDB;
......@@ -376,3 +376,23 @@ if( my $lite = $multi->get_DBAdaptor( 'lite' ) ) {
debug( "Store done" );
}
# tests for update method
# go get a fresh gene again
$gene = $ga->fetch_by_stable_id( "ENSG00000171456" );
# the first update should no effect
$ga->update($gene);
my $newgene = $ga->fetch_by_stable_id( "ENSG00000171456" );
ok ( $newgene->display_xref == 128324 );
ok ( $newgene->type eq 'ensembl' );
# now change the original gene and update it
$gene->display_xref(42);
$gene->type('dummy');
$ga->update($gene);
$newgene = $ga->fetch_by_stable_id( "ENSG00000171456" );
ok ( $newgene->display_xref == 42 );
ok ( $newgene->type eq 'dummy' );
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment