Sha256: 2ec03925e550c98e46c7c73e9c235d53b3d7242b19d80e2c6bc86b0171a418b1

Contents?: true

Size: 447 Bytes

Versions: 15

Compression:

Stored size: 447 Bytes

Contents

require 'spec_helper'

describe 'Roqua::StatusChecks::CheckDbConnection' do
  it 'returns true when there is a db connection' do
    expect(Roqua::StatusChecks::CheckDbConnection.connected?).to be_truthy
  end

  it 'returns false when there is no db configured' do
    allow(ActiveRecord::Base).to receive_message_chain(:connection, :active?).and_return(false)
    expect(Roqua::StatusChecks::CheckDbConnection.connected?).to be_falsey
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
roqua-support-0.4.4 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.4.3 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.4.2 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.4.1 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.4.0 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.3.5 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.3.4 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.3.3 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.3.2 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.3.1 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.3.0 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.1.34 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.1.33 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.1.32 spec/roqua/status_checks/check_db_connection_spec.rb
roqua-support-0.1.31 spec/roqua/status_checks/check_db_connection_spec.rb