aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/alert_new.t6
-rw-r--r--t/app/controller/auth.t26
-rw-r--r--t/app/controller/my.t4
-rw-r--r--t/app/controller/report_import.t8
-rw-r--r--t/app/controller/report_new.t1
-rw-r--r--t/app/controller/report_updates.t2
6 files changed, 20 insertions, 27 deletions
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t
index 5bf7e31dd..d0976b4bb 100644
--- a/t/app/controller/alert_new.t
+++ b/t/app/controller/alert_new.t
@@ -193,8 +193,8 @@ foreach my $test (
foreach my $test (
{
desc => 'logged in user signing up',
- user => 'test-login@example.com',
- email => 'test-login@example.com',
+ user => 'test-sign-in@example.com',
+ email => 'test-sign-in@example.com',
type => 'council',
param1 => 2651,
param2 => 2651,
@@ -203,7 +203,7 @@ foreach my $test (
{
desc => 'logged in user signing up with different email',
user => 'loggedin@example.com',
- email => 'test-login@example.com',
+ email => 'test-sign-in@example.com',
type => 'council',
param1 => 2651,
param2 => 2651,
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t
index 79db69704..8fbc413ec 100644
--- a/t/app/controller/auth.t
+++ b/t/app/controller/auth.t
@@ -38,7 +38,7 @@ for my $test (
{
form_name => 'general_auth',
fields => { email => $email, },
- button => 'email_login',
+ button => 'email_sign_in',
},
"try to create an account with email '$email'"
);
@@ -53,7 +53,7 @@ $mech->submit_form_ok(
{
form_name => 'general_auth',
fields => { email => $test_email, },
- button => 'email_login',
+ button => 'email_sign_in',
},
"create an account for '$test_email'"
);
@@ -100,7 +100,7 @@ $mech->not_logged_in_ok;
$mech->not_logged_in_ok;
}
-# get a login email and change password
+# get a sign in email and change password
{
$mech->clear_emails_ok;
$mech->get_ok('/auth');
@@ -111,9 +111,9 @@ $mech->not_logged_in_ok;
email => "$test_email",
r => 'faq', # Just as a test
},
- button => 'email_login',
+ button => 'email_sign_in',
},
- "email_login with '$test_email'"
+ "email_sign_in with '$test_email'"
);
# rest is as before so no need to test
@@ -182,19 +182,19 @@ $mech->not_logged_in_ok;
}
foreach my $remember_me ( '1', '0' ) {
- subtest "login using valid details (remember_me => '$remember_me')" => sub {
+ subtest "sign in using valid details (remember_me => '$remember_me')" => sub {
$mech->get_ok('/auth');
$mech->submit_form_ok(
{
form_name => 'general_auth',
fields => {
email => $test_email,
- password => $test_password,
+ password_sign_in => $test_password,
remember_me => ( $remember_me ? 1 : undef ),
},
- button => 'login',
+ button => 'sign_in',
},
- "login with '$test_email' & '$test_password"
+ "sign in with '$test_email' & '$test_password"
);
is $mech->uri->path, '/my', "redirected to correct page";
@@ -210,18 +210,18 @@ foreach my $remember_me ( '1', '0' ) {
};
}
-# try to login with bad details
+# try to sign in with bad details
$mech->get_ok('/auth');
$mech->submit_form_ok(
{
form_name => 'general_auth',
fields => {
email => $test_email,
- password => 'not the password',
+ password_sign_in => 'not the password',
},
- button => 'login',
+ button => 'sign_in',
},
- "login with '$test_email' & '$test_password"
+ "sign in with '$test_email' & '$test_password"
);
is $mech->uri->path, '/auth', "redirected to correct page";
$mech->content_contains( 'Email or password wrong', 'found error message' );
diff --git a/t/app/controller/my.t b/t/app/controller/my.t
index 1ed6806a4..da509e8ed 100644
--- a/t/app/controller/my.t
+++ b/t/app/controller/my.t
@@ -7,9 +7,9 @@ use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
$mech->get_ok('/my');
-is $mech->uri->path, '/auth', "got sent to the login page";
+is $mech->uri->path, '/auth', "got sent to the sign in page";
-# login
+# sign in
my $user = $mech->log_in_ok( 'test@example.com' );
$mech->get_ok('/my');
is $mech->uri->path, '/my', "stayed on '/my/' page";
diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t
index 154de13d8..ba73b2555 100644
--- a/t/app/controller/report_import.t
+++ b/t/app/controller/report_import.t
@@ -119,7 +119,6 @@ subtest "Submit a correct entry" => sub {
is_deeply $mech->visible_form_values,
{
name => 'Test User',
- email => 'test@example.com',
title => 'Test report',
detail => 'This is a test report',
photo => '',
@@ -134,7 +133,6 @@ subtest "Submit a correct entry" => sub {
{
with_fields => {
name => 'New Test User',
- email => 'test@example.com',
title => 'New Test report',
detail => 'This is a test report',
phone => '01234 567 890',
@@ -193,14 +191,13 @@ subtest "Submit a correct entry (with location)" => sub {
# go to the token url
$mech->get_ok($token_url);
- # check that we are on '/around'
- is $mech->uri->path, '/report/new', "sent to /around";
+ # check that we are on '/report/new'
+ is $mech->uri->path, '/report/new', "sent to /report/new";
# check that fields are prefilled for us
is_deeply $mech->visible_form_values,
{
name => 'Test User ll',
- email => 'test-ll@example.com',
title => 'Test report ll',
detail => 'This is a test report ll',
photo => '',
@@ -215,7 +212,6 @@ subtest "Submit a correct entry (with location)" => sub {
{
with_fields => {
name => 'New Test User ll',
- email => 'test-ll@example.com',
title => 'New Test report ll',
detail => 'This is a test report ll',
phone => '01234 567 890',
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 01c29ecf4..3e486d22c 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -406,7 +406,6 @@ foreach my $test (
title => '',
detail => '',
may_show_name => '1',
- email => $test_email,
name => 'Test User',
phone => '01234 567 890',
photo => '',
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t
index 5d6f902e3..f0916610b 100644
--- a/t/app/controller/report_updates.t
+++ b/t/app/controller/report_updates.t
@@ -775,7 +775,6 @@ foreach my $test (
alert => 1, # we signed up for alerts before, do not unsign us
anonymous => 0,
answered => 0,
- login => 1,
path => '/report/update',
content =>
"Thanks, glad to hear it's been fixed! Could we just ask if you have ever reported a problem to a council before?",
@@ -803,7 +802,6 @@ foreach my $test (
alert => 1, # we signed up for alerts before, do not unsign us
anonymous => 0,
answered => 1,
- login => 1,
path => '/report/' . $report->id,
content => $report->title,
},