3 t/integration/ajax.t - Integration tests for AJAXy stuff
21 use SGN::Test::WWW::Mechanize;
23 my $mech = SGN::Test::WWW::Mechanize->new;
26 "/image/ajax/image_ajax_form.pl?action=view",
27 "/image/ajax/image_ajax_form.pl?action=",
28 "/image/ajax/image_ajax_form.pl",
29 "/image/ajax/image_ajax_form.pl?action=edit",
30 "/image/ajax/image_ajax_form.pl?object_id=0",
33 plan( tests => 2*@ajax_urls );
34 my $j = JSON::Any->new;
35 for my $url (@ajax_urls) {
37 is_valid_json($mech->content, "$url is valid JSON");
38 my $out = $j->decode( $mech->content );