Implementedtests, recompiled README.
[catagits/Catalyst-Controller-MovableType.git] / t / live-test.t
CommitLineData
ebf8ace2 1#!/usr/bin/env perl
2
3use strict;
4use warnings;
5use Test::More;
6
7# setup library path
8use FindBin qw($Bin);
9use lib "$Bin/lib";
10
11# make sure testapp works
12use ok 'TestApp';
13
14# a live test against TestApp, the test application
15use Test::WWW::Mechanize::Catalyst 'TestApp';
16my $mech = Test::WWW::Mechanize::Catalyst->new;
17$mech->get_ok('http://localhost/', 'get main page');
18$mech->content_like(qr/it works/i, 'see if it has our text');
19
9839e790 20foreach my $script_name qw( mt-add-notify.cgi
21 mt-atom.cgi
22 mt.cgi
23 mt-comments.cgi
24 mt-feed.cgi
25 mt-ftsearch.cgi
26 mt-search.cgi
27 mt-tb.cgi
28 mt-testbg.cgi
29 mt-upgrade.cgi
30 mt-wizard.cgi
31 mt-xmlrpc.cgi
32 ) {
33 # mt-config.cgi intentionally left out
34 my $mech = Test::WWW::Mechanize::Catalyst->new;
35 $mech->get_ok('http://localhost/mt/'.$script_name, 'get '.$script_name.' cgi');
36 $mech->content_like(qr/This is $script_name/, 'cgi script properly executed through Catalyst');
37}
38
39# TODO: test for mt-check.cgi to only work in $c->debug mode.
40
ebf8ace2 41done_testing;