From 048767149e571469d888ec81d324caa7b3b64671 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 30 Apr 2019 18:05:07 +0200 Subject: use a separate table for registration tokens --- t/02-registration.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/02-registration.t b/t/02-registration.t index 89bf475..b595337 100644 --- a/t/02-registration.t +++ b/t/02-registration.t @@ -71,9 +71,11 @@ $t->post_ok( ); $t->status_is(200)->content_like(qr{nicht freigeschaltet}); -my $res = $t->app->pg->db->select( 'users', [ 'id', 'token' ], - { name => 'someone' } ); -my ( $uid, $token ) = @{ $res->hash }{qw{id token}}; +my $res = $t->app->pg->db->select( 'users', ['id'], { name => 'someone' } ); +my $uid = $res->hash->{id}; +$res = $t->app->pg->db->select( 'pending_registrations', ['token'], + { user_id => $uid } ); +my $token = $res->hash->{token}; # Successful verification $t->get_ok("/reg/${uid}/${token}"); -- cgit v1.2.3