We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d047e99 commit 32ba84eCopy full SHA for 32ba84e
spec/mongo/client_spec.rb
@@ -742,4 +742,24 @@
742
expect(client.dup.options).to be_a(Mongo::Options::Redacted)
743
end
744
745
+
746
+ describe '#collections' do
747
748
+ before do
749
+ authorized_client.database[:users].create
750
+ end
751
752
+ after do
753
+ authorized_client.database[:users].drop
754
755
756
+ let(:collection) do
757
+ Mongo::Collection.new(authorized_client.database, 'users')
758
759
760
+ it 'refers the current database collections' do
761
+ expect(authorized_client.collections).to include(collection)
762
+ expect(authorized_client.collections).to all(be_a(Mongo::Collection))
763
764
765
0 commit comments