X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F01app.t;fp=t%2F01app.t;h=474256743726d2e2335150a1335aebe6ccc8020b;hb=6dac263862e569fbd4512241201d11e764162479;hp=68d3bf4f7a7804a0b2ea066651714bf26e8830ac;hpb=ca06a1778cf7fcaf4650602e65f1a7e2a1129de9;p=catagits%2FGitalist.git diff --git a/t/01app.t b/t/01app.t index 68d3bf4..4742567 100644 --- a/t/01app.t +++ b/t/01app.t @@ -3,12 +3,14 @@ use strict; use warnings; use Test::More; use FindBin qw/$Bin/; +use lib "$Bin/lib"; BEGIN { $ENV{GITALIST_CONFIG} = $Bin; $ENV{GITALIST_REPO_DIR} = ''; use_ok 'Catalyst::Test', 'Gitalist'; } +use TestGitalist; for my $p ('', qw/ repo1 nodescription bare.git opml /) { my $path = '/' . $p; @@ -51,22 +53,3 @@ like $response->content, qr/Page not found/, 'invalid repository handled correct } done_testing; - -sub test_uri { - my ($uri, $qs) = @_; - $qs ||= ''; - my $request = "/$uri"; - $request .= "?$qs" if defined $qs; - my $response = request($request); - ok($response->is_success, "ok $uri - $qs"); - return $response; -} - -sub curry_test_uri { - my $prefix = shift; - my $to_curry = shift || \&test_uri; - sub { - my $uri = shift; - $to_curry->("$prefix/$uri", @_); - }; -}