Commit | Line | Data |
ebf8ace2 |
1 | #!/usr/bin/env perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | use Test::More; |
6 | |
7 | # setup library path |
8 | use FindBin qw($Bin); |
9 | use lib "$Bin/lib"; |
10 | |
11 | # make sure testapp works |
12 | use ok 'TestApp'; |
13 | |
14 | # a live test against TestApp, the test application |
15 | use Test::WWW::Mechanize::Catalyst 'TestApp'; |
16 | my $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 |
20 | foreach 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 |
41 | done_testing; |