X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=t%2F07_bugreport.t;h=0366be41b9c5b72a5229c94f0aafe4a0bb01480e;hb=98422d682786dac1dd2191b60cb82584b92b73f3;hp=ea33725e6d6967351b0d91ee2339aae6c5daf643;hpb=3abc990040c12b55a8e25a5511dccc0866c6e631;p=debbugs.git diff --git a/t/07_bugreport.t b/t/07_bugreport.t index ea33725..0366be4 100644 --- a/t/07_bugreport.t +++ b/t/07_bugreport.t @@ -1,7 +1,7 @@ # -*- mode: cperl;-*- -# $Id: 05_mail.t,v 1.1 2005/08/17 21:46:17 don Exp $ -use Test::More tests => 2; + +use Test::More tests => 6; use warnings; use strict; @@ -22,7 +22,6 @@ use Test::WWW::Mechanize; # The test functions are placed here to make things easier use lib qw(t/lib); use DebbugsTest qw(:all); -use Data::Dumper; my %config; eval { @@ -45,7 +44,7 @@ END{ send_message(to=>'submit@bugs.something', headers => [To => 'submit@bugs.something', From => 'foo@bugs.something', - Subject => 'Submiting a bug', + Subject => 'Submitting a bug', ], body => <new(); -$mech->get_ok('http://localhost:'.$port.'/?bug=1'); +$mech->get_ok('http://localhost:'.$port.'/?bug=1', + 'Page received ok'); +ok($mech->content() =~ qr/\\#1.+Submitting a bug/i, + 'Title of bug is submitting a bug'); + +$mech->get_ok('http://localhost:'.$port.'/?bug=1;mbox=yes', + 'Page received ok'); +ok($mech->content() =~ qr/Subject: Submitting a bug/i, + 'Subject of bug maibox is right'); +ok($mech->content() =~ qr/^From /m, + 'Starts with a From appropriately'); + + +# Other tests for bugs in the page should be added here eventually +