test/test_verbs.rb in mechanize-1.0.1.beta.20110107104205 vs test/test_verbs.rb in mechanize-2.0.pre.1
- old
+ new
@@ -6,20 +6,20 @@
end
def test_put
page = @agent.put('http://localhost/verb', 'foo')
assert_equal 1, @agent.history.length
- assert_equal('method: PUT', page.body)
+ assert_equal 'PUT', page.header['X-Request-Method']
end
def test_delete
page = @agent.delete('http://localhost/verb', { 'q' => 'foo' })
assert_equal 1, @agent.history.length
- assert_equal('method: DELETE', page.body)
+ assert_equal 'DELETE', page.header['X-Request-Method']
end
def test_head
page = @agent.head('http://localhost/verb', { 'q' => 'foo' })
assert_equal 0, @agent.history.length
- assert_equal('method: HEAD', page.body)
+ assert_equal 'HEAD', page.header['X-Request-Method']
end
end