File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,10 @@ class URI
168168 #
169169 # @since 2.0.0
170170 AUTH_MECH_MAP = {
171- 'PLAIN' => :plain ,
172- 'MONGODB-CR' => :mongodb_cr ,
173- 'GSSAPI' => :gssapi
171+ 'PLAIN' => :plain ,
172+ 'MONGODB-CR' => :mongodb_cr ,
173+ 'GSSAPI' => :gssapi ,
174+ 'SCRAM-SHA-1' => :scram
174175 } . freeze
175176
176177 # Options that are allowed to appear more than once in the uri.
Original file line number Diff line number Diff line change 524524 let ( :mechanism ) { 'GSSAPI' }
525525 let ( :expected ) { :gssapi }
526526
527-
528527 it 'sets the auth mechanism to :gssapi' do
529528 expect ( uri . uri_options [ :auth_mech ] ) . to eq ( expected )
530529 end
531530 end
531+
532+ context 'scram-sha-1' do
533+ let ( :mechanism ) { 'SCRAM-SHA-1' }
534+ let ( :expected ) { :scram }
535+
536+ it 'sets the auth mechanism to :scram' do
537+ expect ( uri . uri_options [ :auth_mech ] ) . to eq ( expected )
538+ end
539+ end
532540 end
533541
534542 context 'auth source provided' do
You can’t perform that action at this time.
0 commit comments