Reintroduce email support for login (fixes #165; reverts #e208d30513f7cfafb6405324fee5b88902dcf2fb) - 2
Change-Id: Ia145f1e47295e2e5df0248604262024f87583bab
diff --git a/t/subfolder.t b/t/subfolder.t
index f1e5730..88eba3a 100644
--- a/t/subfolder.t
+++ b/t/subfolder.t
@@ -19,7 +19,7 @@
my $q = qr!(?:\"|")!;
-$t->post_ok('/user/login' => form => { handle => 'test', pwd => 'fail' })
+$t->post_ok('/user/login' => form => { handle_or_email => 'test', pwd => 'fail' })
->status_is(302)
->header_is('Location' => '/');
@@ -29,7 +29,7 @@
->element_exists('script[src^=/js/kalamar-]')
->element_exists('div.notify-error')
->text_is('div.notify-error', 'Bad CSRF token')
- ->element_exists('input[name=handle][value=test]')
+ ->element_exists('input[name=handle_or_email][value=test]')
->element_exists_not('div.button.top a')
->attr_is('body','data-korap-url','')
->header_exists_not('Strict-Transport-Security')
@@ -50,7 +50,7 @@
}
});
-$t->post_ok('/user/login' => form => { handle => 'test', pwd => 'fail' })
+$t->post_ok('/user/login' => form => { handle_or_email => 'test', pwd => 'fail' })
->status_is(302)
->header_is('Location' => '/')
->header_is('Strict-Transport-Security', 'max-age=3600; includeSubDomains')
@@ -88,7 +88,7 @@
is('kalamar-koraptest',$t->app->sessions->cookie_name);
ok($t->app->sessions->secure);
-$t->post_ok('/user/login' => form => { handle => 'test', pwd => 'fail' })
+$t->post_ok('/user/login' => form => { handle_or_email => 'test', pwd => 'fail' })
->status_is(302)
->header_is('Location' => '/');