Fix tests dying in absence of bootstrap scripts.
[catagits/Gitalist.git] / t / opml.t
1 #!/usr/bin/env perl
2 use FindBin qw/$Bin/;
3 BEGIN {
4     my $env = "$FindBin::Bin/script/env";
5     if (-r $env) {
6         do $env or die $@;
7     }
8 }
9
10 use lib "$Bin/lib";
11 use TestGitalist;
12 use HTTP::Request::Common;
13
14 my $res = request(GET 'http://localhost/opml', 'Content-Type' => 'application/rss');
15
16 ok $res->is_success;
17
18 is $res->content_type, 'application/rss';
19 like $res->content, qr{Gitalist</title>};
20 like $res->content, qr{xmlUrl="http://localhost/bare.git/rss"};
21 like $res->content, qr{text="repo1 - some test repository"};
22 like $res->content, qr{xmlUrl="http://localhost/repo1/rss"};
23
24 done_testing;