spec/mongo/auth/x509_spec.rb in mongo-2.10.5 vs spec/mongo/auth/x509_spec.rb in mongo-2.11.0.rc0
- old
+ new
@@ -1,38 +1,10 @@
require 'spec_helper'
describe Mongo::Auth::X509 do
- let(:address) do
- default_address
- end
-
- let(:monitoring) do
- Mongo::Monitoring.new(monitoring: false)
- end
-
- let(:listeners) do
- Mongo::Event::Listeners.new
- end
-
- let(:cluster) do
- double('cluster').tap do |cl|
- allow(cl).to receive(:topology).and_return(topology)
- allow(cl).to receive(:app_metadata).and_return(app_metadata)
- allow(cl).to receive(:options).and_return({})
- allow(cl).to receive(:cluster_time).and_return(nil)
- allow(cl).to receive(:update_cluster_time)
- end
- end
-
- declare_topology_double
-
let(:server) do
- Mongo::Server.new(address, cluster, monitoring, listeners,
- SpecConfig.instance.test_options
- ).tap do |server|
- server.scan!
- end
+ authorized_client.cluster.next_primary
end
let(:connection) do
Mongo::Server::Connection.new(server, SpecConfig.instance.test_options)
end