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="k">my $verbose = 0; $nomail = 1 if (@ARGV==1 && $ARGV[0] eq '--nomail'); $verbose = 1 if (@ARGV==1 && $ARGV[0] eq '--verbose'); $verbose = 1 if $nomail; return ($verbose, $nomail); } sub site { my $base_url = shift; my $site = 'fixmystreet'; $site = 'emptyhomes' if $base_url =~ 'emptyhomes'; $site = 'zurich' if $base_url =~ 'zurich'; return $site; } sub language { my $site = shift; if ($site eq 'emptyhomes') { mySociety::Locale::negotiate_language('en-gb,English,en_GB|cy,Cymraeg,cy_GB'); mySociety::Locale::gettext_domain('FixMyStreet-EmptyHomes', 1); } else { mySociety::Locale::negotiate_language('en-gb,English,en_GB|nb,Norwegian,nb_NO'); # XXX Testing mySociety::Locale::gettext_domain('FixMyStreet', 1); } } 1;