Merge branch 'master' into topic/dt_feature_search
[sgn.git] / t / legacy / integration / phenome / generic_gene_page.t
blobf92a2bc4648a930b2283ac83363d4aaf6a37c727
1 #!/usr/bin/perl
2 use Test::More tests => 6;
4 use strict;
5 use warnings;
6 use Carp;
7 use lib 't/lib';
8 use SGN::Test::WWW::Mechanize;
9 use CXGN::Phenome::GenericGenePage;
11 $SIG{__DIE__} = \&Carp::confess;
14 my $mech = SGN::Test::WWW::Mechanize->new;
16 my $dbh = $mech->context->dbc->dbh();
18 my $ggp = CXGN::Phenome::GenericGenePage
19 ->new( -id => 428,
20 -dbh => $dbh,
23 test_xml( $ggp->render_xml );
25 # now test it on the site
26 my $url = '/phenome/generic_gene_page.pl';
27 $mech->get( "$url?locus_id=428" );
28 test_xml( $mech->content );
30 sub test_xml {
31 my ($content) = @_;
32 like( $content, qr/dwarf/, 'result looks OK');
33 like( $content, qr/<gene/, 'result looks OK');
34 like( $content, qr/<data_provider>/, 'result looks OK');