Permalink
Browse files

modified tests to avoid warnings

  • Loading branch information...
1 parent 4954573 commit 0c814efcf0cc2deed0776934cc31c0d67433b833 @hidek hidek committed Jul 5, 2010
Showing with 0 additions and 162 deletions.
  1. +0 −30 t/lib/TestApp02.pm
  2. +0 −20 t/lib/TestApp03.pm
  3. +0 −41 t/lib/TestApp04.pm
  4. +0 −14 t/lib/TestApp05.pm
  5. +0 −46 t/lib/TestApp06.pm
  6. +0 −11 t/lib/TestApp07.pm
View
@@ -16,35 +16,5 @@ __PACKAGE__->config(
);
__PACKAGE__->setup;
-sub action1 : Global {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- $c->res->body($c->form->error('param1'));
- } else {
- $c->res->body('no errors');
- }
-}
-
-sub action2 : Global {
- my ($self, $c) = @_;
-
- if ($c->req->method eq 'POST') {
- $c->forward('action2_submit');
- } else {
- $c->res->body('no $c->form executed');
- }
-}
-
-sub action2_submit : Private {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- $c->res->body($c->form->error('param1'));
- } else {
- $c->res->body('no errors');
- }
-}
-
1;
View
@@ -12,25 +12,5 @@ __PACKAGE__->config(
);
__PACKAGE__->setup;
-sub action1 : Global {
- my ($self, $c) = @_;
-
- $c->res->body($c->validator_profile);
-}
-
-sub action2 : Global {
- my ($self, $c) = @_;
-
- if ($c->req->method eq 'POST') {
- $c->forward('action1');
- }
-}
-
-sub action3 : Global {
- my ($self, $c) = @_;
- $c->forward('action1');
- $c->res->body($c->validator_profile);
-}
-
1;
View
@@ -23,46 +23,5 @@ __PACKAGE__->config(
);
__PACKAGE__->setup;
-sub action1 : Global {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- $c->res->body(
- $c->form->message->get(
- $c->validator_profile, 'param1', $c->form->error('param1')
- )
- );
- } else {
- $c->res->body('no errors');
- }
-}
-
-sub action2 : Global {
- my ($self, $c) = @_;
-
- if ($c->req->method eq 'POST') {
- $c->forward('action2_submit');
- } else {
- $c->res->body('no $c->form executed');
- }
-}
-
-sub action2_submit : Private {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- $c->res->body($c->form->error('param1'));
- } else {
- $c->res->body('no errors');
- }
-}
-
-sub action3 : Global {
- my ($self, $c) = @_;
-
- $c->set_invalid_form(param1 => 'SELF');
- $c->res->body($c->form_messages('param1')->[0]);
-}
-
1;
View
@@ -20,19 +20,5 @@ __PACKAGE__->config(
);
__PACKAGE__->setup;
-sub action1 : Global {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- if (($c->req->params->{as} || '') eq 'hash') {
- $c->res->body($c->form_messages->{param1}->[0]);
- } else {
- $c->res->body($c->form_messages('param1')->[0]);
- }
- } else {
- $c->res->body('no errors');
- }
-}
-
1;
View
@@ -22,51 +22,5 @@ __PACKAGE__->config(
);
__PACKAGE__->setup;
-sub action_a : Local {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- $c->forward('action_b');
- } else {
- $c->res->body('a');
- }
-
- if (($c->req->params->{restore} || '') eq 'a') {
- $c->res->body($c->form_messages->{input}->[0]);
- }
-}
-
-sub action_b : Local {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- $c->forward('action_c');
- } else {
- $c->res->body('b');
- }
-
- if (($c->req->params->{restore} || '') eq 'b') {
- $c->res->body(
- $c->form->field_messages($c->validator_profile)->{input}[0]);
- }
-}
-
-sub action_c : Local {
- my ($self, $c) = @_;
-
- if ($c->form->has_error) {
- $c->res->body('error');
- } else {
- $c->res->body('c');
- }
-}
-
-sub no_validate_action : Local {
- my ($self, $c) = @_;
-
- $c->forward('action_a');
- $c->res->body($c->form_messages->{input}->[0]);
-}
-
1;
View
@@ -15,15 +15,4 @@ __PACKAGE__->config(
);
__PACKAGE__->setup;
-sub action1 : Global {
- my ($self, $c) = @_;
-
- $c->res->body(@{$c->form_messages('param1')});
-}
-
-sub action2 : Global {
- my ($self, $c) = @_;
- $c->res->body(@{$c->form_messages('param1')});
-}
-
1;

0 comments on commit 0c814ef

Please sign in to comment.