[Catalyst-commits] r12523 - in trunk/examples/CatalystAdvent: lib/CatalystAdvent/Controller t

dhoss at dev.catalyst.perl.org dhoss at dev.catalyst.perl.org
Mon Jan 4 20:25:52 GMT 2010


Author: dhoss
Date: 2010-01-04 20:25:48 +0000 (Mon, 04 Jan 2010)
New Revision: 12523

Added:
   trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Search.pm
   trunk/examples/CatalystAdvent/t/controller_Search.t
Log:
added skeleton test and Search controller

Added: trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Search.pm
===================================================================
--- trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Search.pm	                        (rev 0)
+++ trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Search.pm	2010-01-04 20:25:48 UTC (rev 12523)
@@ -0,0 +1,42 @@
+package CatalystAdvent::Controller::Search;
+
+use strict;
+use warnings;
+use parent 'Catalyst::Controller';
+
+=head1 NAME
+
+CatalystAdvent::Controller::Search - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index
+
+=cut
+
+sub index :Path :Args(0) {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched CatalystAdvent::Controller::Search in Search.');
+}
+
+
+=head1 AUTHOR
+
+Devin Austin
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/examples/CatalystAdvent/t/controller_Search.t
===================================================================
--- trunk/examples/CatalystAdvent/t/controller_Search.t	                        (rev 0)
+++ trunk/examples/CatalystAdvent/t/controller_Search.t	2010-01-04 20:25:48 UTC (rev 12523)
@@ -0,0 +1,12 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'Search' }
+BEGIN { use_ok 'CatalystAdvent::Controller::Search' }
+
+ok( request('/search')->is_success, 'Request should succeed' );
+
+
+
+done_testing();




More information about the Catalyst-commits mailing list