summaryrefslogtreecommitdiff
path: root/spec/support/capybara_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/capybara_helpers.rb')
-rw-r--r--spec/support/capybara_helpers.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/capybara_helpers.rb b/spec/support/capybara_helpers.rb
index b57a3493aff..3eb7bea3227 100644
--- a/spec/support/capybara_helpers.rb
+++ b/spec/support/capybara_helpers.rb
@@ -35,6 +35,11 @@ module CapybaraHelpers
visit 'about:blank'
visit url
end
+
+ # Simulate a browser restart by clearing the session cookie.
+ def clear_browser_session
+ page.driver.remove_cookie('_gitlab_session')
+ end
end
RSpec.configure do |config|