minor: test fix
This commit is contained in:
parent
043590f9a3
commit
9c30de332f
|
@ -89,6 +89,7 @@ module Mongo
|
|||
|
||||
# Are we allowing reads from secondaries?
|
||||
@read_secondary = opts.fetch(:read_secondary, false)
|
||||
@slave_okay = false
|
||||
|
||||
setup(opts)
|
||||
end
|
||||
|
|
|
@ -123,6 +123,13 @@ class DBTest < Test::Unit::TestCase
|
|||
@@db.remove_user('spongebob')
|
||||
end
|
||||
|
||||
def test_authenticate_with_special_characters
|
||||
assert @@db.add_user('foo:bar', '@foo')
|
||||
assert @@db.authenticate('foo:bar', '@foo')
|
||||
@@db.logout
|
||||
@@db.remove_user('foo:bar')
|
||||
end
|
||||
|
||||
def test_authenticate_with_connection_uri
|
||||
@@db.add_user('spongebob', 'squarepants')
|
||||
assert Mongo::Connection.from_uri("mongodb://spongebob:squarepants@#{host_port}/#{@@db.name}")
|
||||
|
|
Loading…
Reference in New Issue