spec/mongo/auth/x509_spec.rb in mongo-2.11.6 vs spec/mongo/auth/x509_spec.rb in mongo-2.12.0.rc0
- old
+ new
@@ -46,18 +46,22 @@
# requires the login to fail.
require_no_x509_auth
context 'when the user is not authorized for the database' do
+ before do
+ connection.connect!
+ end
+
let(:x509) do
described_class.new(user)
end
let(:login) do
x509.login(connection).documents[0]
end
- it 'logs the user into the connection' do
+ it 'attempts to log the user into the connection' do
expect {
x509.login(connection)
}.to raise_error(Mongo::Auth::Unauthorized)
end
end