Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/middleware/compressed_json_spec.rb')
-rw-r--r--spec/lib/gitlab/middleware/compressed_json_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/lib/gitlab/middleware/compressed_json_spec.rb b/spec/lib/gitlab/middleware/compressed_json_spec.rb
index c5efc568971..a07cd49c572 100644
--- a/spec/lib/gitlab/middleware/compressed_json_spec.rb
+++ b/spec/lib/gitlab/middleware/compressed_json_spec.rb
@@ -8,11 +8,12 @@ RSpec.describe Gitlab::Middleware::CompressedJson do
let(:app) { double(:app) }
let(:middleware) { described_class.new(app) }
+ let(:content_type) { 'application/json' }
let(:env) do
{
'HTTP_CONTENT_ENCODING' => 'gzip',
'REQUEST_METHOD' => 'POST',
- 'CONTENT_TYPE' => 'application/json',
+ 'CONTENT_TYPE' => content_type,
'PATH_INFO' => path,
'rack.input' => StringIO.new(input)
}
@@ -35,6 +36,12 @@ RSpec.describe Gitlab::Middleware::CompressedJson do
let(:path) { '/api/v4/error_tracking/collector/1/store'}
it_behaves_like 'decompress middleware'
+
+ context 'with no Content-Type' do
+ let(:content_type) { nil }
+
+ it_behaves_like 'decompress middleware'
+ end
end
context 'with collector route under relative url' do