3 t/integration/feature_search.t - integration tests for feature search URLs
7 Tests for feature search URLs
20 use SGN::Test::WWW::Mechanize skip_cgi => 1;
22 my $mech = SGN::Test::WWW::Mechanize->new;
24 $mech->get_ok("/search/features");
25 $mech->content_like(qr/search/i);
26 $mech->content_contains('<script', 'yep, there is some javascript in there, hah');
31 /search/features/feature_types_service?page=1&start=0&limit=25
32 /search/features/featureprop_types_service?page=1&start=0&limit=25
33 /search/features/srcfeatures_service?page=1&start=0&limit=25
34 /search/features/search_service?page=1&start=0&limit=100&sort=feature_id&dir=ASC
35 /search/features/search_service?organism=lycoper&type_id=22627&srcfeature_id=&srcfeature_start=&srcfeature_end=&proptype_id=&page=1&start=0&limit=100&sort=feature_id&dir=ASC
36 /search/features/search_service?_dc=1321036511068&organism=lycoper&type_id=&srcfeature_id=&srcfeature_start=&srcfeature_end=&proptype_id=24269&prop_value=1&page=1&start=0&limit=100&sort=feature_id&dir=ASC
39 for my $url ( @urls ) {
40 $mech->get_ok( $url );
41 is_valid_json $mech->content;
44 $mech->get_ok('/search/features/export_csv?organism=lycop&type_id=22157&srcfeature_id=17638255&srcfeature_start=1&srcfeature_end=1000000');