Skip to content
Snippets Groups Projects
Commit 0ac47eda authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Test adding new descriptions for existing analysis as well.

parent 985c940d
No related branches found
No related tags found
No related merge requests found
BEGIN { $| = 1;
use Test;
plan tests => 14;
plan tests => 15;
}
my $loaded = 0;
......@@ -63,7 +63,7 @@ ok( check_methods( $analysis_out, "db", "db_file", "dbID", "compare",
ok( $analysis_out->description eq "some funny description" );
ok( count_rows( $db, "analysis_description" ) == 2 );
# try updating
# try updating existing description
$analysis->logic_name("new_dummy");
$analysis->description("new description");
$analysis->display_label("new label");
......@@ -74,6 +74,22 @@ ok($analysis_updated->logic_name() eq "new_dummy");
ok($analysis_updated->description() eq "new description");
ok($analysis_updated->display_label() eq "new label");
# now try updating analysis that has no existing description
$analysis = Bio::EnsEMBL::Analysis->new();
$analysis->logic_name('dummy_analysis');
$analysis->created( "2005-10-28 10:28:29");
$analysis_ad->store($analysis);
$dbID = $analysis->dbID();
print "## description before: " . $analysis->description() . "\n";
$analysis->description("updated description");
$analysis_ad->update($analysis);
$analysis_updated = $analysis_ad->fetch_by_dbID($dbID);
ok($analysis_updated->description() eq "updated description");
print "## description after: " . $analysis_updated->description() . "\n";
$multi->restore();
......
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