0.11_09 commit
[bse.git] / t / t00smoke.t
1 #!perl -w
2 use strict;
3 use BSE::Test;
4
5 ++$|;
6 print "1..27\n";
7 my $baseurl = base_url;
8 ok($baseurl =~ /^http:/, "basic check of base url");
9 my $ua = make_ua;
10 fetch_ok($ua, "admin menu - check the site exists at all", "$baseurl/admin/", "Admin");
11 fetch_ok($ua, "generate all", "$baseurl/cgi-bin/admin/generate.pl",
12         "html", "Refresh: 0; .*/admin/");
13 fetch_ok($ua, "generate all verbose", 
14          "$baseurl/cgi-bin/admin/generate.pl?progress=1",
15          "Regenerating your site.*Return to admin menu");
16 fetch_ok($ua, "index", "$baseurl/", "Home");
17 fetch_ok($ua, "shop", "$baseurl/shop/", "The Shop - Catalogue Items");
18 fetch_ok($ua, "shop cart", "$baseurl/cgi-bin/shop.pl",
19          "Shopping Cart Items");
20 fetch_ok($ua, "shop cart checkout no items", "$baseurl/cgi-bin/shop.pl",
21          "Shopping Cart Items");
22 fetch_ok($ua, "build search index", "$baseurl/cgi-bin/admin/makeIndex.pl",
23          "html", "Refresh: 0; .*/admin/");
24 fetch_ok($ua, "advanced search form", "$baseurl/cgi-bin/search.pl",
25          "All\\s+lower\\s+case");
26 fetch_ok($ua, "failed search", "$baseurl/cgi-bin/search.pl?q=blargle",
27          "No\\s+documents\\s+were\\s+found");
28 fetch_ok($ua, "good search", "$baseurl/cgi-bin/search.pl?q=title",
29          qr!My\s+site's\s+title.*\[formatting\s+guide!s);
30 fetch_ok($ua, "user logon page", "$baseurl/cgi-bin/user.pl",
31          qr!User\s+Logon!s);
32