Test uri_for with path = 0
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_ctx_attr.t
1 use strict;
2 use warnings;
3 use FindBin qw/$Bin/;
4 use lib "$FindBin::Bin/../lib";
5 use Test::More;
6 use URI;
7
8 use_ok('TestApp');
9
10 my $request = Catalyst::Request->new( {
11                 _log => Catalyst::Log->new,
12                 base => URI->new('http://127.0.0.1/foo')
13               } );
14 my $dispatcher = TestApp->dispatcher;
15 my $context = TestApp->new( {
16                 request => $request,
17                 namespace => 'yada',
18               } );
19
20 is(        $context->hello_lazy,    'hello there', '$context->hello_lazy');
21 eval { is( $context->hello_notlazy, 'hello there', '$context->hello_notlazy') };
22 TODO: {
23    local $TODO = 'we appear to have a lazy bug';
24    if ($@) {
25       fail('$context->hello_notlazy');
26       warn $@;
27    }
28 }
29
30 done_testing;
31