Sha256: 00e028ac26b71ae0df38ce29b66ae986e76c159350625fc220380be2b1e8cba4

Contents?: true

Size: 542 Bytes

Versions: 6

Compression:

Stored size: 542 Bytes

Contents

require "helper"

class TestIfModifiedSince < Test::Unit::TestCase
  def setup
    @agent = Mechanize.new
  end

  def test_get_twice
    assert_equal(0, @agent.history.length)
    page = @agent.get('http://localhost/if_modified_since')
    assert_match(/You did not send/, page.body)

    assert_equal(1, @agent.history.length)
    page2 = @agent.get('http://localhost/if_modified_since')

    assert_equal(2, @agent.history.length)
    assert_equal(page.object_id, page2.object_id)
    assert_match(/You did not send/, page.body)
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
domo-0.0.4 vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_if_modified_since.rb
mechanize-2.0 test/test_if_modified_since.rb
mechanize-2.0.pre.2 test/test_if_modified_since.rb
mechanize-2.0.pre.1 test/test_if_modified_since.rb
mechanize-1.0.1.beta.20110107104205 test/test_if_modified_since.rb
mechanize-1.0.0 test/test_if_modified_since.rb