Add testing to atom, fix RSS links
[catagits/Gitalist.git] / t / atom.t
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
4 use Test::More;
5 use FindBin qw/$Bin/;
6
7 BEGIN {
8     $ENV{GITALIST_CONFIG} = $Bin;
9     $ENV{GITALIST_REPO_DIR} = '';
10     use_ok 'Catalyst::Test', 'Gitalist';
11 }
12
13 my $res = request('/repo1/atom');
14 ok $res->is_success;
15
16 TODO: {
17     local $TODO = "Does not work yet. Need similar info to RSS feed";
18     like $res->content, qr{link>http://localhost/repo1</link};
19     like $res->content, qr{description>some test repository</description};
20 }
21 like $res->content, qr{add dir1/file2</div};
22 like $res->content, qr{<id>http://localhost/repo1/36c6c6708b8360d7023e8a1649c45bcf9b3bd818</id};
23 like $res->content, qr{title>add dir1/file2</title};
24
25 done_testing;