summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-04-20 22:09:34 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-04-20 22:09:34 +0200
commit582e8b874c50804dbfba348eb7ecbdee79a5d90f (patch)
treead05a1053fb08304ca87cebcdc4887f6df864a69
parentaad2a53459860539dde463e7952636c7ddd3a629 (diff)
fix tests
-rw-r--r--t/02-registration.t14
-rw-r--r--t/11-journey-stats.t1
-rw-r--r--t/12-journey-edit.t1
-rw-r--r--t/r-negative-delay.t1
4 files changed, 17 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',
diff --git a/t/11-journey-stats.t b/t/11-journey-stats.t
index 808a15c..e50c5b6 100644
--- a/t/11-journey-stats.t
+++ b/t/11-journey-stats.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',
diff --git a/t/12-journey-edit.t b/t/12-journey-edit.t
index 941ff95..1f00b85 100644
--- a/t/12-journey-edit.t
+++ b/t/12-journey-edit.t
@@ -45,6 +45,7 @@ my $csrf_token
$t->post_ok(
'/register' => form => {
csrf_token => $csrf_token,
+ dt => 1,
user => 'someone',
email => 'foo@example.org',
password => 'foofoofoo',
diff --git a/t/r-negative-delay.t b/t/r-negative-delay.t
index 2b6f271..7abe1bc 100644
--- a/t/r-negative-delay.t
+++ b/t/r-negative-delay.t
@@ -44,6 +44,7 @@ my $csrf_token
$t->post_ok(
'/register' => form => {
csrf_token => $csrf_token,
+ dt => 1,
user => 'someone',
email => 'foo@example.org',
password => 'foofoofoo',