test/integration/cookie_test.rb in quo_vadis-1.0.3 vs test/integration/cookie_test.rb in quo_vadis-1.0.4
- old
+ new
@@ -67,31 +67,6 @@
sign_in_as 'bob', 'secret'
close_browser
visit new_article_path
assert_equal sign_in_path, current_path
end
-
-
- #
- # Code below from https://github.com/nruth/show_me_the_cookies
- #
-
- def delete_cookie(cookie_name)
- cookie_jar.instance_variable_get(:@cookies).reject! do |existing_cookie|
- existing_cookie.name.downcase == cookie_name
- end
- end
-
- def get_cookie(cookie_name)
- cookie_jar.instance_variable_get(:@cookies).select do |existing_cookie|
- existing_cookie.name.downcase == cookie_name
- end.first
- end
-
- def cookie_jar
- Capybara.current_session.driver.current_session.instance_variable_get(:@rack_mock_session).cookie_jar
- end
-
- def close_browser
- delete_cookie Rails.application.config.session_options[:key]
- end
end