Skip to content

Commit

Permalink
use val method in test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 22, 2015
1 parent 5dd03aa commit b42c294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/mojolicious/validation_lite_app.t
Expand Up @@ -263,7 +263,7 @@ $t->get_ok('/forgery' => form => {foo => 'bar'})->status_is(200)
->element_exists('[value=bar]')->element_exists_not('.field-with-error');

# Correct CSRF token
my $token = $t->ua->get('/forgery')->res->dom->at('[name=csrf_token]')->{value};
my $token = $t->ua->get('/forgery')->res->dom->at('[name=csrf_token]')->val;
$t->post_ok('/forgery' => form => {csrf_token => $token, foo => 'bar'})
->status_is(200)->content_unlike(qr/Wrong or missing CSRF token!/)
->element_exists('[value=bar]')->element_exists_not('.field-with-error');
Expand Down

0 comments on commit b42c294

Please sign in to comment.