Sha256: b31279e159fe9bfcc8ae172a6ca0fe3393eb3028f58e89ae2eaec315b51098e5
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 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(spec, unique: true) end after do authorized_collection.indexes.drop(spec) 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongo-2.0.0.beta | spec/mongo/operation/read/indexes_spec.rb |