File tree 2 files changed +4
-2
lines changed
lib/rspec_api_documentation 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def format_header(header)
69
69
end
70
70
71
71
def format_full_header ( header , value )
72
- formatted_value = value . gsub ( /"/ , "\\ \" " )
72
+ formatted_value = value ? value . gsub ( /"/ , "\\ \" " ) : ''
73
73
"#{ format_header ( header ) } : #{ formatted_value } "
74
74
end
75
75
Original file line number Diff line number Diff line change 15
15
"HTTP_X_HEADER" => "header" ,
16
16
"HTTP_AUTHORIZATION" => %{Token token="mytoken"} ,
17
17
"HTTP_HOST" => "example.org" ,
18
- "HTTP_COOKIES" => ""
18
+ "HTTP_COOKIES" => "" ,
19
+ "HTTP_SERVER" => nil
19
20
}
20
21
end
21
22
26
27
it { should =~ /-H "Accept: application\/ json"/ }
27
28
it { should =~ /-H "X-Header: header"/ }
28
29
it { should =~ /-H "Authorization: Token token=\\ "mytoken\\ ""/ }
30
+ it { should =~ /-H "Server: "/ }
29
31
it { should_not =~ /-H "Host: example\. org"/ }
30
32
it { should_not =~ /-H "Cookies: "/ }
31
33
You can’t perform that action at this time.
0 commit comments