File: unit_core_ctx_attr.t

package info (click to toggle)
libcatalyst-perl 5.90132-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,016 kB
  • sloc: perl: 11,061; makefile: 7
file content (31 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use strict;
use warnings;
use FindBin qw/$Bin/;
use lib "$FindBin::Bin/../lib";
use Test::More;
use URI;

use_ok('TestApp');

my $request = Catalyst::Request->new( {
                _log => Catalyst::Log->new,
                base => URI->new('http://127.0.0.1/foo')
              } );
my $dispatcher = TestApp->dispatcher;
my $context = TestApp->new( {
                request => $request,
                namespace => 'yada',
              } );

is(        $context->hello_lazy,    'hello there', '$context->hello_lazy');
eval { is( $context->hello_notlazy, 'hello there', '$context->hello_notlazy') };
TODO: {
   local $TODO = 'we appear to have a lazy bug';
   if ($@) {
      fail('$context->hello_notlazy');
      warn $@;
   }
}

done_testing;