[icinga-checkins] icinga.org: icinga-core/dev/cgis: Add rewritten history test

git at icinga.org git at icinga.org
Sat Feb 25 15:43:47 CET 2012


Module: icinga-core
Branch: dev/cgis
Commit: 5cb3ce67af3818c3e9522f46af80ba391d42bfb6
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=5cb3ce67af3818c3e9522f46af80ba391d42bfb6

Author: Alexander Wirt <formorer at debian.org>
Date:   Fri Feb 24 23:12:28 2012 +0100

Add rewritten history test

---

 t/620history.t |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/t/620history.t b/t/620history.t
new file mode 100644
index 0000000..e79a3e9
--- /dev/null
+++ b/t/620history.t
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use FindBin qw($Bin);
+
+use Test::More;
+
+eval "use Test::HTML::Lint";
+if ($@) {
+	plan skip_all => "Need Test::HTML::Lint";
+}
+
+eval "use Test::WWW::Mechanize::CGI";
+if ($@) {
+	plan skip_all => "Need Test::WWW::Mechanize::CGI";
+}
+
+my $lint;
+eval '$lint = HTML::Lint->new( only_types => HTML::Lint::Error::STRUCTURE )';
+
+plan tests => 4;
+
+chdir $Bin or die "Cannot chdir";
+
+my $topdir = "$Bin/..";
+my $cgi_dir = "$topdir/cgi";
+
+my $mech = Test::WWW::Mechanize::CGI->new;
+
+$mech->env( ICINGA_CGI_CONFIG => "etc/cgi.cfg" );
+$mech->cgi_application("$cgi_dir/history.cgi");
+
+$mech->get_ok("http://localhost/");
+
+$mech->title_is("History", 'Title is \'History\'');
+
+$mech->content_contains('[05-15-2009 00:56:31]  Icinga 1.2.1 starting... (PID=48451)',
+    'Contains Icinga startup message');
+html_ok( $lint, $mech->content, "HTML correct" );
+





More information about the icinga-checkins mailing list