mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
0b87e7543f
Rolling out frozen string literals further by freezing all string literals in core specs.
16 lines
418 B
Ruby
16 lines
418 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|
|
|
|
c.before(:each, content_type: :json, type: :request) do |_ex|
|
|
header("Content-Type", "application/json")
|
|
end
|
|
end
|