Sha256: 567046ad664c0fcb6d94aa1463616337273e62225a1b1557a4726e46c00f17f8

Contents?: true

Size: 1.56 KB

Versions: 47

Compression:

Stored size: 1.56 KB

Contents

shared_examples_for "CGI environment variables compliance" do
	specify "REQUEST_URI contains the request URI including query string" do
		cgi_envs = get('/welcome/cgi_environment?foo=escaped%20string')
		cgi_envs.should include("REQUEST_URI = #{@base_uri}/welcome/cgi_environment?foo=escaped%20string\n")
	end
	
	specify "REQUEST_URI contains the original escaped URI" do
		cgi_envs = get('/welcome/cgi_environment/%C3%BC?foo=escaped%20string')
		cgi_envs.downcase.should include("request_uri = #{@base_uri}/welcome/cgi_environment/%c3%bc?foo=escaped%20string\n")
	end
	
	specify "PATH_INFO contains the request URI without the base URI and without the query string" do
		cgi_envs = get('/welcome/cgi_environment?foo=escaped%20string')
		cgi_envs.should include("PATH_INFO = /welcome/cgi_environment\n")
	end
	
	specify "PATH_INFO contains the original escaped URI" do
		cgi_envs = get('/welcome/cgi_environment/%C3%BC')
		cgi_envs.downcase.should include("path_info = /welcome/cgi_environment/%c3%bc\n")
	end
	
	specify "QUERY_STRING contains the query string" do
		cgi_envs = get('/welcome/cgi_environment?foo=escaped%20string')
		cgi_envs.should include("QUERY_STRING = foo=escaped%20string\n")
	end
	
	specify "QUERY_STRING must be present even when there's no query string" do
		cgi_envs = get('/welcome/cgi_environment')
		cgi_envs.should include("QUERY_STRING = \n")
	end
	
	specify "SCRIPT_NAME contains the base URI, or the empty string if the app is deployed on the root URI" do
		cgi_envs = get('/welcome/cgi_environment')
		cgi_envs.should include("SCRIPT_NAME = #{@base_uri}\n")
	end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
passenger-4.0.5 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.21 test/integration_tests/cgi_environment_spec.rb
passenger-4.0.4 test/integration_tests/cgi_environment_spec.rb
passenger-4.0.3 test/integration_tests/cgi_environment_spec.rb
passenger-4.0.2 test/integration_tests/cgi_environment_spec.rb
passenger-4.0.1 test/integration_tests/cgi_environment_spec.rb
passenger-4.0.0.rc6 test/integration_tests/cgi_environment_spec.rb
passenger-4.0.0.rc4 test/integration_tests/cgi_environment_spec.rb
passenger-3.9.2.beta test/integration_tests/cgi_environment_spec.rb
passenger-3.0.19 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.18 test/integration_tests/cgi_environment_spec.rb
passenger-3.9.1.beta test/integration_tests/cgi_environment_spec.rb
passenger-3.0.17 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.15 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.14 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.13 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.12 test/integration_tests/cgi_environment_spec.rb
yspassenger-3.0.12 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.11 test/integration_tests/cgi_environment_spec.rb
passenger-3.0.10 test/integration_tests/cgi_environment_spec.rb