Use appropriate prototype depending on perl version in test.
[catagits/Gitalist.git] / t / rss.t
diff --git a/t/rss.t b/t/rss.t
index 47f4c8d..4122db9 100644 (file)
--- a/t/rss.t
+++ b/t/rss.t
@@ -1,11 +1,19 @@
 #!/usr/bin/env perl
 use FindBin qw/$Bin/;
+BEGIN {
+    my $env = "$FindBin::Bin/../script/env";
+    if (-r $env) {
+        do $env or die $@;
+    }
+}
+
 use lib "$Bin/lib";
 use TestGitalist;
+use HTTP::Request::Common;
 
-my $res = request('/repo1/rss');
+my $res = request(GET 'http://localhost/repo1/rss', 'Content-Type' => 'application/rss+xml');
 ok $res->is_success;
-
+is $res->content_type, 'application/rss+xml';
 like $res->content, qr{link>http://localhost/repo1</link};
 like $res->content, qr{description>some test repository</description};
 like $res->content, qr{title>add dir1/file2</title};