diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-08-22 15:07:21 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-09-16 12:42:19 +0100 |
commit | c954d92fe4f558a5f4375016ee6cf517d3ec5ddd (patch) | |
tree | 76dbb00be79403fdae6d3d7eeedd7ee2b5027fc9 | |
parent | 2fdf336adb60e9010952a5fb7f593febc3fdffa2 (diff) |
Fix problem with integration session reuse.
The third (and any subsequent) session created shares a session id with
the second without this explicit reset.
-rw-r--r-- | spec/integration/alaveteli_dsl.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/integration/alaveteli_dsl.rb b/spec/integration/alaveteli_dsl.rb index 8897f0db0..119bb05a0 100644 --- a/spec/integration/alaveteli_dsl.rb +++ b/spec/integration/alaveteli_dsl.rb @@ -28,7 +28,11 @@ end def login(user) open_session do |sess| + # Make sure we get a fresh empty session - there seems to be some + # problem with session leakage otherwise + sess.reset! sess.extend(AlaveteliDsl) + if user.is_a? User u = user else @@ -59,3 +63,6 @@ def close_request(request) request.handle_rejected_responses = 'holding_pen' request.save! end + + + |