diff options
Diffstat (limited to 't/app/controller/my.t')
-rw-r--r-- | t/app/controller/my.t | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/app/controller/my.t b/t/app/controller/my.t new file mode 100644 index 000000000..1ed6806a4 --- /dev/null +++ b/t/app/controller/my.t @@ -0,0 +1,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 login page"; + +# login +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 ); + |