From f598f56fab4492821eaf8e7507d7b3a99e4a9e2a Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 6 Apr 2016 15:28:47 +0100 Subject: Prevent dev sites auto-creating session. We check for a session's existence before looking in it, as looking in it first would auto create a session. --- t/app/controller/auth_social.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 't/app/controller') diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t index 84fdd4dfe..b8675a8fd 100644 --- a/t/app/controller/auth_social.t +++ b/t/app/controller/auth_social.t @@ -31,7 +31,10 @@ my $fb_uid = 123456789; for my $fb_state ( 'refused', 'no email', 'existing UID', 'okay' ) { for my $page ( 'my', 'report', 'update' ) { subtest "test FB '$fb_state' login for page '$page'" => sub { + # Lots of user changes happening here, make sure we don't confuse + # Catalyst with a cookie session user that no longer exists $mech->log_out_ok; + $mech->cookie_jar({}); if ($fb_state eq 'existing UID') { my $user = $mech->create_user_ok($fb_email); $user->update({ facebook_id => $fb_uid }); -- cgit v1.2.3