浏览代码

test httpoxy workaround

Matthew Haughton 7 年之前
父节点
当前提交
b17020dca8
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      spec/defines/resource_location_spec.rb

+ 8 - 0
spec/defines/resource_location_spec.rb

@@ -510,6 +510,14 @@ describe 'nginx::resource::location' do
                   with_content(%r|fastcgi_param\s+CUSTOM_PARAM2\s+value2;|)
         end
       end
+      
+      context "when fastcgi_param is {'HTTP_PROXY' => '""'}" do
+        let :params do default_params.merge({ :fastcgi_param => {'HTTP_PROXY' => '""'} }) end
+        it "should set fastcgi_param" do
+        should contain_concat__fragment("vhost1-500-" + Digest::MD5.hexdigest("#{params[:location]}")).
+                  with_content(%r|fastcgi_param\s+HTTP_PROXY\s+"";|)
+        end
+      end
 
       context "when fastcgi_param is not set" do
         let :params do default_params end