Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions spec/integration/auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@
end

# An existing user will negotiate scram-sha-256.
# A non-existing user negotiate scram-sha-1.
it 'indicates scram-sha-1 was used' do
# A non-existing user will negotiate scram-sha-1 or scram-sha-256
# depending on the server version.
it 'raises an unauthorized error indicating scram was used' do
expect do
connection.connect!
end.to raise_error(Mongo::Auth::Unauthorized,
/User nonexistent_user \(mechanism: scram\) is not authorized to access admin.*used mechanism: SCRAM-SHA-1/)
/User nonexistent_user \(mechanism: scram(256)?\) is not authorized to access admin.*used mechanism: SCRAM-SHA-(1|256)/)
Comment on lines 50 to +52
end
end

Expand Down
Loading