+
+# Check how this blocked bug is presented on the web interface
+
+# start up an HTTP::Server::Simple
+my $bugreport_cgi_handler = sub {
+ # I do not understand why this is necessary.
+ $ENV{DEBBUGS_CONFIG_FILE} = "$config{config_dir}/debbugs_config";
+ my $content = qx(perl -I. -T cgi/bugreport.cgi);
+ $content =~ s/^\s*Content-Type:[^\n]+\n*//si;
+ print $content;
+};
+
+my $port = 11342;
+
+ok(DebbugsTest::HTTPServer::fork_and_create_webserver($bugreport_cgi_handler,$port),
+ 'forked HTTP::Server::Simple successfully');
+
+my $mech = Test::WWW::Mechanize->new();
+
+$mech->get_ok('http://localhost:'.$port.'/?bug=10',
+ 'Page received ok');
+
+ok($mech->content() =~ qr//i,
+ 'Title of bug is \'Submitting a bug\'');
+
+ok($mech->content() =~ qr/Added blocking bug\(s\) of <a[^>]+10[^>]+>10<\/a>: <a[^>]+2[^>]+>2<\/a>/i,
+ '\'Added blocking bug(s) of x: y\' received markup');
+
+$mech->get_ok('http://localhost:'.$port.'/?bug=2',
+ 'Page received ok');
+
+ok($mech->content() =~ qr/Added indication that bug <a[^>]+2[^>]+>2<\/a> blocks <a[^>]+10[^>]+>10<\/a>/i,
+ '\'indication that bug x blocks y\' received markup');