X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_priorities.t;h=82437e3fa0600d74399d19f3b7861104653aa573;hb=4e93cdb6d9403718baff430bc1bdc3245aa5236f;hp=1e05747529e0bdfdc3196bc1e86a9d173ea8ca2b;hpb=ae29b412955743885e80350085167b54b69672da;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_priorities.t b/t/aggregate/live_priorities.t index 1e05747..82437e3 100644 --- a/t/aggregate/live_priorities.t +++ b/t/aggregate/live_priorities.t @@ -1,12 +1,10 @@ -#!perl - use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; -use Test::More tests => 28; +use Test::More tests => 14; use Catalyst::Test 'TestApp'; local $^W = 0; @@ -15,18 +13,11 @@ my $uri_base = 'http://localhost/priorities'; my @tests = ( # Simple - 'Regex vs. Local', { path => '/re_vs_loc', expect => 'local' }, - 'Regex vs. LocalRegex', { path => '/re_vs_locre', expect => 'regex' }, - 'Regex vs. Path', { path => '/re_vs_path', expect => 'path' }, - 'Local vs. LocalRegex', { path => '/loc_vs_locre', expect => 'local' }, 'Local vs. Path 1', { path => '/loc_vs_path1', expect => 'local' }, 'Local vs. Path 2', { path => '/loc_vs_path2', expect => 'path' }, - 'Path vs. LocalRegex', { path => '/path_vs_locre', expect => 'path' }, # index - 'index vs. Regex', { path => '/re_vs_index', expect => 'index' }, 'index vs. Local', { path => '/loc_vs_index', expect => 'index' }, - 'index vs. LocalRegex', { path => '/locre_vs_index', expect => 'index' }, 'index vs. Path', { path => '/path_vs_index', expect => 'index' }, 'multimethod zero', { path => '/multimethod', expect => 'zero' }, @@ -41,14 +32,14 @@ while ( @tests ) { my $data = shift @tests; # Run tests for path with trailing slash and without - SKIP: for my $req_uri - ( + SKIP: for my $req_uri + ( join( '' => $uri_base, $data->{ path } ), # Without trailing path join( '' => $uri_base, $data->{ path }, '/' ), # With trailing path ) { my $end_slash = ( $req_uri =~ qr(/$) ? 1 : 0 ); - # use slash_expect argument if URI ends with slash + # use slash_expect argument if URI ends with slash # and the slash_expect argument is defined my $expect = $data->{ expect } || ''; if ( $end_slash and exists $data->{ slash_expect } ) {