1 # A test for adding a list of stocks (accessions)
2 ## Jeremy D. Edwards (jde22@cornell.edu) 2013
8 use Test::More tests=>5;
9 use SGN::Test::WWW::Mechanize;
11 BEGIN {require_ok('Moose');}
12 BEGIN {use_ok('CXGN::DB::Connection');}
13 BEGIN {use_ok('CXGN::Stock::AddStocks');}
15 my $test = SGN::Test::WWW::Mechanize->new();
16 my $schema = $test->context->dbic_schema('Bio::Chado::Schema', 'sgn_chado');
17 my @accession_array = qw(test545563334234 testing3443555233);
18 my $species = "Manihot esculenta";
19 ok(my $stock_add = CXGN::Stock::AddStocks->new({ schema => $schema, stocks => \@accession_array, species => $species} ), "Create object for adding stocks");
20 ok($stock_add->validate_stocks(), "Verify");
21 ok($stock_add->add_accessions(), "Add");