silence warnings in tests
[catagits/Catalyst-Runtime.git] / t / accept_context_regression.t
CommitLineData
42d0a52a 1use strict;
2use warnings;
3use Test::More;
98d049ef 4
53c7cc10 5BEGIN {
98d049ef 6 package MyApp::Model::AcceptContext;
7 use base 'Catalyst::Model';
8
9 sub ACCEPT_CONTEXT {
10 my ($self, $c, @args) = @_;
42d0a52a 11 Test::More::ok( ref $c);
98d049ef 12 }
13
14 $INC{'MyApp/Model/AcceptContext.pm'} = __FILE__;
53c7cc10 15}
98d049ef 16
53c7cc10 17BEGIN {
98d049ef 18 package MyApp::Controller::Root;
19 use base 'Catalyst::Controller';
20
21 sub test_model :Local {
22 my ($self, $c) = @_;
23 $c->res->body('test');
24 }
25
26 $INC{'MyApp/Controller/Root.pm'} = __FILE__;
53c7cc10 27}
98d049ef 28
53c7cc10 29BEGIN {
98d049ef 30 package MyApp;
31 use Catalyst;
88e5a8b0 32
98d049ef 33 MyApp->setup;
34}
35
36use Catalyst::Test 'MyApp';
37
53c7cc10 38my ($res, $c) = ctx_request('/root/test_model');
98d049ef 39
40ok $res;
41
98d049ef 42done_testing;