Skip to content

Commit 2f52be4

Browse files
committed
RUBY-577: update old tests for delegated auth
1 parent 46d9ed5 commit 2f52be4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/functional/connection_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ def test_connection_activity
349349
context "Saved authentications" do
350350
setup do
351351
@client = standard_connection
352-
@auth = {:db_name => 'test', :username => 'bob', :password => 'secret'}
353-
@client.add_auth(@auth[:db_name], @auth[:username], @auth[:password])
352+
@auth = {:db_name => 'test', :username => 'bob', :password => 'secret', :source => nil}
353+
@client.add_auth(@auth[:db_name], @auth[:username], @auth[:password], @auth[:source])
354354
end
355355

356356
teardown do
@@ -362,9 +362,9 @@ def test_connection_activity
362362
end
363363

364364
should "not allow multiple authentications for the same db" do
365-
auth = {:db_name => 'test', :username => 'mickey', :password => 'm0u53'}
365+
auth = {:db_name => 'test', :username => 'mickey', :password => 'm0u53', :source => nil}
366366
assert_raise Mongo::MongoArgumentError do
367-
@client.add_auth(auth[:db_name], auth[:username], auth[:password])
367+
@client.add_auth(auth[:db_name], auth[:username], auth[:password], auth[:source])
368368
end
369369
end
370370

test/unit/db_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class DBTest < Test::Unit::TestCase
8888

8989
should "raise an error if logging out fails" do
9090
@db.expects(:command).returns({})
91-
@client.expects(:pool_size).returns(1)
91+
@client.expects(:auths).returns([])
9292
assert_raise Mongo::MongoDBError do
9393
@db.logout
9494
end

0 commit comments

Comments
 (0)