IntegrationTests/spec/support/ownet/includes/faker.rb
##
#
# Fake url with status, data and headers
#
Fake url with status, data and headers
Fake url with status data and headers
def url(url, options = {})
					normalized_url = normalize_url(url)
					@fakes[normalized_url] = {
						original_url: url
					}
					if options[:with_response]
						@fakes[normalized_url][:response] = options[:with_response]
					else
						@fakes[normalized_url][:response] = [
							options[:with_status] || 200, 
							options[:with_headers] || {}, 
							[options[:with_body] || ''], 
						]
					end
					nil
				end
def url ( url , options = { } ) normalized_url = normalize_url ( url ) @fakes [ normalized_url ] = { original_url : url } if options [ :with_response ] @fakes [ normalized_url ] [ :response ] = options [ :with_response ] else @fakes [ normalized_url ] [ :response ] = [ options [ :with_status ] || 200 , options [ :with_headers ] || { } , [ options [ :with_body ] || '' ] , ] end nil end
Fake url with status, data and headers
Fake url with status data and headers
url
<not_specific>
options
<not_specific>