File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 591
591
end
592
592
end
593
593
594
- context 'when authorized_collections are provided' do
594
+ context 'when authorized_collections are provided as false ' do
595
595
let ( :options ) do
596
596
{ authorized_collections : false }
597
597
end
612
612
end
613
613
end
614
614
615
+ context 'when authorized_collections are provided as true' do
616
+ let ( :options ) do
617
+ { authorized_collections : true }
618
+ end
619
+
620
+ let! ( :result ) do
621
+ database . collections ( options )
622
+ end
623
+
624
+ let ( :events ) do
625
+ subscriber . command_started_events ( 'listCollections' )
626
+ end
627
+
628
+ it 'authorized_collections not passed to server because false' do
629
+ expect ( events . length ) . to eq ( 1 )
630
+ command = events . first . command
631
+ expect ( command [ 'nameOnly' ] ) . to eq ( true )
632
+ expect ( command [ 'authorizedCollections' ] ) . to eq ( true )
633
+ end
634
+ end
635
+
615
636
context 'when no options are provided' do
616
637
let! ( :result ) do
617
638
database . collections
You can’t perform that action at this time.
0 commit comments