We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d7565 commit bc101e5Copy full SHA for bc101e5
spec/headers_spec.rb
@@ -0,0 +1,26 @@
1
+require 'spec_helper'
2
+
3
+class FakeHeaderable
4
+ include RspecApiDocumentation::Headers
5
6
+ def public_env_to_headers(env)
7
+ env_to_headers(env)
8
+ end
9
+end
10
11
+describe RspecApiDocumentation::Headers do
12
+ let(:example) { FakeHeaderable.new }
13
14
+ describe '#env_to_headers' do
15
+ subject { example.public_env_to_headers(env) }
16
17
+ context 'When the env contains "CONTENT_TYPE"' do
18
+ let(:env) { { "CONTENT_TYPE" => 'multipart/form-data' } }
19
20
+ it 'converts the header to "Content-Type"' do
21
+ expect(subject['Content-Type']).to eq 'multipart/form-data'
22
23
24
25
26
0 commit comments