Sha256: 09d0955cf9fbbe43cc1fd169eb280f96be05636e02ccb6029636ed5176bd9496
Contents?: true
Size: 601 Bytes
Versions: 9
Compression:
Stored size: 601 Bytes
Contents
require 'spec_helper' describe Mongo::Operation::Read::Indexes do describe '#execute' do let(:spec) do { name: 1 } end before do authorized_collection.indexes.create_one(spec, unique: true) end after do authorized_collection.indexes.drop_one('name_1') end let(:operation) do described_class.new(db_name: TEST_DB, coll_name: TEST_COLL) end let(:indexes) do operation.execute(authorized_primary.context) end it 'returns the indexes for the collection' do expect(indexes.documents.size).to eq(2) end end end
Version data entries
9 entries across 9 versions & 1 rubygems