Method: Net::HTTPExt::Etest#test_w_google_wo_redirection

Defined in:
lib/vex/base/net/http_ext.rb

#test_w_google_wo_redirectionObject



186
187
188
189
190
191
192
193
# File 'lib/vex/base/net/http_ext.rb', line 186

def test_w_google_wo_redirection
  return unless Socket.online?

  google = Net.get("http://www.google.com", :redirect => false)
  assert_equal(302 , google.code)
  assert google.headers["Content-Type"] =~ /text\/html/
  assert google.headers.content_type =~ /text\/html/
end