Sha256: 2bca5d46073f81ed41d25e9817dbdd78c9438535729bcba455b557168ed549cf

Contents?: true

Size: 507 Bytes

Versions: 4

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true
# rubocop:todo all

require 'lite_spec_helper'

describe 'Atlas connectivity' do
  let(:uri) { ENV['ATLAS_URI'] }
  let(:client) { Mongo::Client.new(uri) }

  require_atlas

  describe 'connection to Atlas' do
    it 'runs ismaster successfully' do
      expect { client.database.command(:hello => 1) }
        .not_to raise_error
    end

    it 'runs findOne successfully' do
      expect { client.use(:test)['test'].find.to_a }
        .not_to raise_error
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
mongo-2.20.1 spec/atlas/atlas_connectivity_spec.rb
mogno-2.20.0 spec/atlas/atlas_connectivity_spec.rb
mogno-1.0.0 spec/atlas/atlas_connectivity_spec.rb
mongo-2.20.0 spec/atlas/atlas_connectivity_spec.rb