Skip to content

Commit b8137c7

Browse files
committed
minor: test fix
1 parent 640f1c0 commit b8137c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/slave_connection_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def self.connect_to_slave
88
@@host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
99
@@port = ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT
1010
conn = Connection.new(@@host, @@port, :slave_ok => true)
11-
cmd = conn['admin'].command(:ismaster => 1)
12-
cmd['ok'] == 1 && cmd['ismaster'] != 1
11+
response = conn['admin'].command(:ismaster => 1)
12+
Mongo::Support.ok?(response['ok']) && response['ismaster'] != 1
1313
end
1414

1515
if self.connect_to_slave

0 commit comments

Comments
 (0)