8ffabe16cf3cb2ff2ee317ec318f98966bc9541d
[catagits/Gitalist.git] / t / 01app.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     use_ok 'Catalyst::Test', 'Gitalist'
10 }
11
12 ok( request('/')->is_success, 'Request should succeed' );
13 for my $p (qw/ bare.git repo1 nodescription /) {
14     my $path = '/summary?p=' . $p;
15     ok( request($path)->is_success, "$path should succeed");
16 }
17
18 is request('/summary?p=DoesNotExist')->code, 404,
19     '/summary?p=DoesNotExist 404s';
20
21 done_testing;
22