aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth_social.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-04-06 15:28:47 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-04-06 17:36:26 +0100
commitf598f56fab4492821eaf8e7507d7b3a99e4a9e2a (patch)
tree91995ebb70ce7538ee035c6d581e80264c803107 /t/app/controller/auth_social.t
parentdc5e30296d78b3171188acaef8bca1ae4e7b4596 (diff)
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.
Diffstat (limited to 't/app/controller/auth_social.t')
-rw-r--r--t/app/controller/auth_social.t3
1 files changed, 3 insertions, 0 deletions
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 });