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