aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/my.t
blob: da509e8eda66a64b5a3a352f324076bcd1d68766 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;

use Test::More tests => 11;

use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;

$mech->get_ok('/my');
is $mech->uri->path, '/auth', "got sent to the sign in page";

# sign in
my $user = $mech->log_in_ok( 'test@example.com' );
$mech->get_ok('/my');
is $mech->uri->path, '/my', "stayed on '/my/' page";

# cleanup
$mech->delete_user( $user );
class="s">'body|b=s', "which body ID to close reports for", { required => 1 } ], ['user|u=s', "which user ID to assign closure updates to", { required => 1 } ], ['cobrand=s', "which cobrand template to use for sent emails", { required => 1 } ], ['closure-cutoff=s', "Anything before this will be closed with no email", { required => 1 } ], ['email-cutoff=s', "Anything before this will be closed with an email sent to the reporter", { required => 1 } ], ['limit|l=s', "limit to a certain number of reports/users to be closed"], ['help|h', "print usage message and exit" ], ); print($usage->text), exit if $opts->help; FixMyStreet::Script::ArchiveOldEnquiries::archive($opts);