summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-30 18:05:07 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-30 18:05:07 +0200
commit048767149e571469d888ec81d324caa7b3b64671 (patch)
treed713208b260e83b9b134b48d61cf2817718efde0 /t
parenta57a24c2d68daa4d4561ed9035c863e574cdc70a (diff)
use a separate table for registration tokens
Diffstat (limited to 't')
-rw-r--r--t/02-registration.t8
1 files changed, 5 insertions, 3 deletions
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}");