summaryrefslogtreecommitdiff
path: root/t/02-registration.t
diff options
context:
space:
mode:
Diffstat (limited to 't/02-registration.t')
-rw-r--r--t/02-registration.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/02-registration.t b/t/02-registration.t
index 83b981c..cd2201a 100644
--- a/t/02-registration.t
+++ b/t/02-registration.t
@@ -43,6 +43,7 @@ my $csrf_token
$t->post_ok(
'/register' => form => {
csrf_token => $csrf_token,
+ dt => 1,
user => 'someone',
email => 'foo@example.org',
password => 'foofoofoo',
@@ -51,10 +52,23 @@ $t->post_ok(
);
$t->status_is(200)->content_like(qr{Verifizierungslink});
+# Failed registration (CSRF)
+$t->post_ok(
+ '/register' => form => {
+ csrf_token => $csrf_token,
+ user => 'noone',
+ email => 'foo2@example.org',
+ password => 'foofoofoo',
+ password2 => 'foofoofoo',
+ }
+);
+$t->status_is(200)->content_like(qr{CSRF});
+
# Failed registration (user name not available)
$t->post_ok(
'/register' => form => {
csrf_token => $csrf_token,
+ dt => 1,
user => 'someone',
email => 'foo@example.org',
password => 'foofoofoo',