Browse files

let the bot do the turing challenge

  • Loading branch information...
1 parent c2a9b66 commit 09f117cf6538b5fd9d7e6d48a60a8cf15690cab9 @monken monken committed Oct 12, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 t/server/controller/user/turing.t
View
6 t/server/controller/user/turing.t
@@ -17,7 +17,7 @@ use MetaCPAN::Server::Test;
test_psgi app, sub {
my $cb = shift;
ok( my $res = $cb->(
- POST '/user/turing?access_token=testing',
+ POST '/user/turing?access_token=bot',
Content => encode_json(
{ challenge => "foo",
answer => 0
@@ -29,7 +29,7 @@ test_psgi app, sub {
is( $res->code, 400, "bad request" );
ok( $res = $cb->(
- POST '/user/turing?access_token=testing',
+ POST '/user/turing?access_token=bot',
Content => encode_json(
{ challenge => "foo",
answer => 1,
@@ -38,7 +38,7 @@ test_psgi app, sub {
),
'post challenge'
);
- is( $res->code, 200, "bad request" );
+ is( $res->code, 200, "successful request" );
my $user = decode_json( $res->content );
ok( $user->{looks_human}, 'looks human' );
ok( $user->{passed_captcha}, 'passed captcha' );

0 comments on commit 09f117c

Please sign in to comment.