Fix params issue in controller specs

This commit is contained in:
Matt-Yorkley
2021-01-23 14:24:37 +00:00
parent 1911d25959
commit e46fe3735b

View File

@@ -143,6 +143,9 @@ RSpec.configure do |config|
ActionController::Base.perform_caching = caching
end
# Fix encoding issue in Rails 5.0; allows passing empty arrays or hashes as params.
config.before(:each, type: :controller) { @request.env["CONTENT_TYPE"] = 'application/json' }
# Show javascript errors in test output with `js_debug: true`
config.after(:each, :js_debug) do
errors = page.driver.browser.manage.logs.get(:browser)