]> Dogcows Code - chaz/p5-Catalyst-Plugin-Sitemap/blob - t/sitemap.t
return the $sitemap object instead than the XML directly
[chaz/p5-Catalyst-Plugin-Sitemap] / t / sitemap.t
1
2 use strict;
3 use warnings;
4
5 use Test::More tests => 4; # last test to print
6
7 use lib 't/lib';
8
9 use Catalyst::Test 'TestApp';
10
11 my $xml = request('/sitemap')->content;
12
13 diag $xml;
14
15 $xml =~ s/\s+//g;
16
17 like $xml, qr{<url><loc>http://localhost/root/alone</loc></url>}, ':Sitemap';
18 like $xml, qr{<url><loc>http://localhost/root/with_function</loc></url>},
19 ':Sitemap(*)';
20 like $xml,
21 qr{<url><loc>http://localhost/root/with_priority</loc><priority>0.75</priority></url>},
22 ':Sitemap(0.75)';
23
24 like $xml,
25 qr{<url><loc>http://localhost/root/with_args</loc><lastmod>2010-09-27</lastmod><changefreq>daily</changefreq></url>},
26 ':Sitemap(lotsa stuff)';
27
This page took 0.03346 seconds and 4 git commands to generate.