spec/mongo/collection_spec.rb in mongo-2.11.6 vs spec/mongo/collection_spec.rb in mongo-2.12.0.rc0

- old
+ new

@@ -201,15 +201,15 @@ SpecConfig.instance.auth_options )) end let(:database) do - Mongo::Database.new(client, :test) + Mongo::Database.new(client, SpecConfig.instance.test_db) end let(:collection) do - database.collection(:users) + database.collection('test-collection') end let(:new_collection) do collection.with(new_options) end @@ -239,16 +239,13 @@ expect(client.cluster.options[:server_selection_timeout]).to eq(client.options[:server_selection_timeout]) end end context 'when the client has a read preference set' do - clean_slate_on_evergreen let(:client) do - authorized_client.with(SpecConfig.instance.auth_options.merge( - client_options - )).tap do |client| + authorized_client.with(client_options).tap do |client| expect(client.options[:read]).to eq(Mongo::Options::Redacted.new( mode: :primary_preferred)) end end @@ -276,13 +273,11 @@ context 'when reading from collection' do # Since we are requesting a secondary read, we need a replica set. require_topology :replica_set let(:client_options) do - SpecConfig.instance.auth_options.merge( - read: { mode: :primary_preferred }, - ) + {read: { mode: :primary_preferred }} end let(:subscriber) { EventSubscriber.new } before do @@ -941,33 +936,9 @@ collection.drop end it_behaves_like 'an operation using a session' it_behaves_like 'a failed operation using a session' - end - end - - context 'when collation has a strength' do - min_server_fcv '3.4' - - let(:band_collection) do - described_class.new(database, :bands) - end - - before do - band_collection.delete_many - band_collection.insert_many([{ name: "Depeche Mode" }, { name: "New Order" }]) - end - - let(:options) do - { collation: { locale: 'en_US', strength: 2 } } - end - let(:band_result) do - band_collection.find({ name: 'DEPECHE MODE' }, options) - end - - it 'finds Capitalize from UPPER CASE' do - expect(band_result.count_documents).to eq(1) end end end describe '#drop' do