Permalink
Browse files

bumping up version, fixing boog

  • Loading branch information...
1 parent c024be6 commit 012de2e9905d6c2021734dcc2c048e9e6778b240 @tenderlove tenderlove committed Sep 24, 2008
Showing with 20 additions and 1 deletion.
  1. +5 −0 History.txt
  2. +1 −1 lib/www/mechanize.rb
  3. +14 −0 test/test_authenticate.rb
View
@@ -1,5 +1,10 @@
= Mechanize CHANGELOG
+=== 0.8.2
+
+* Bug Fixes:
+ * Doh! I was accidentally setting headers twice.
+
=== 0.8.1
* Bug Fixes:
View
@@ -46,7 +46,7 @@ module WWW
class Mechanize
##
# The version of Mechanize you are using.
- VERSION = '0.8.1'
+ VERSION = '0.8.2'
##
# User Agent aliases
View
@@ -1,4 +1,5 @@
require File.expand_path(File.join(File.dirname(__FILE__), "helper"))
+require 'pp'
class BasicAuthTest < Test::Unit::TestCase
def setup
@@ -17,6 +18,19 @@ def test_digest_auth_success
assert_equal('You are authenticated', page.body)
end
+ def test_no_duplicate_headers
+ block_called = false
+ @agent.pre_connect_hooks << lambda { |params|
+ block_called = true
+ params[:request].to_hash.each do |k,v|
+ assert_equal(1, v.length)
+ end
+ }
+ @agent.basic_auth('user', 'pass')
+ page = @agent.get("http://localhost/digest_auth")
+ assert block_called
+ end
+
def test_post_auth_success
class << @agent
alias :old_fetch_page :fetch_page

0 comments on commit 012de2e

Please sign in to comment.