OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/spec/support/request_with_session_header.rb

13 lines
272 B

RSpec.configure do |c|
##
# Session-based API authentication requires the X-requested-with header to be present.
c.before(:each, type: :request) do |ex|
unless ex.metadata[:skip_xhr_header]
header('X-Requested-With', 'XMLHttpRequest')
end
end
end