Skip to content

Commit

Permalink
more diversity for validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 4, 2013
1 parent e1bbfd5 commit ac0112b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/mojolicious/validation_lite_app.t
Expand Up @@ -12,7 +12,7 @@ use Test::Mojo;
# Custom check
app->validator->add_check(two => sub { length $_[2] == 2 });

get '/' => sub {
any '/' => sub {
my $self = shift;

my $validation = $self->validation;
Expand Down Expand Up @@ -138,7 +138,7 @@ $t->get_ok('/' => form => {foo => '☃☃'})->status_is(200)
->element_exists('input[type="password"]');

# Validation failed for required fields
$t->get_ok('/' => form => {foo => 'no'})->status_is(200)
$t->post_ok('/' => form => {foo => 'no'})->status_is(200)
->text_is('div:root' => 'in')
->text_is('label.custom.field-with-error[for="foo"]' => '<Foo>')
->element_exists('input.custom.field-with-error[type="text"][value="no"]')
Expand Down

0 comments on commit ac0112b

Please sign in to comment.