X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fopml.t;h=1b8ac0262d64b240397844f6761b932c679658dd;hb=df6292661bd22bb00ba89f0684b60bb8096383c8;hp=ee94c853ebc581b78a20ec846746eda0b72e8c60;hpb=ade777e57a93cbf76e27268c1fe45835eb14ba48;p=catagits%2FGitalist.git diff --git a/t/opml.t b/t/opml.t index ee94c85..1b8ac02 100644 --- a/t/opml.t +++ b/t/opml.t @@ -1,18 +1,21 @@ #!/usr/bin/env perl -use strict; -use warnings; -use Test::More; use FindBin qw/$Bin/; - BEGIN { - $ENV{GITALIST_CONFIG} = $Bin; - $ENV{GITALIST_REPO_DIR} = ''; - use_ok 'Catalyst::Test', 'Gitalist'; + my $env = "$FindBin::Bin/script/env"; + if (-r $env) { + do $env or die $@; + } } -my $res = request('/opml'); +use lib "$Bin/lib"; +use TestGitalist; +use HTTP::Request::Common; + +my $res = request(GET 'http://localhost/opml', 'Content-Type' => 'application/rss'); + ok $res->is_success; +is $res->content_type, 'application/rss'; like $res->content, qr{Gitalist}; like $res->content, qr{xmlUrl="http://localhost/bare.git/rss"}; like $res->content, qr{text="repo1 - some test repository"};