Sha256: 76ea96fcebc3bb287340c6d5cd2c1f7c8f88f34f194118e5b02e6026f78467d2
Contents?: true
Size: 759 Bytes
Versions: 5
Compression:
Stored size: 759 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), "helper")) class FollowMetaTest < Test::Unit::TestCase def setup @agent = WWW::Mechanize.new end def test_follow_meta page = @agent.get('http://localhost/tc_follow_meta.html') assert_equal('http://localhost/tc_follow_meta.html', page.uri.to_s) assert_equal(1, page.meta.length) @agent.follow_meta_refresh = true page = @agent.get('http://localhost/tc_follow_meta.html') assert_equal('http://localhost/index.html', page.uri.to_s) assert_equal(3, @agent.history.length) end def test_follow_meta_on_302 @agent.follow_meta_refresh = true assert_nothing_raised { @agent.get("http://localhost/response_code?code=302&ct=test/xml") } end end
Version data entries
5 entries across 5 versions & 1 rubygems