Skip to content

Commit

Permalink
[influitive#128] added config spec coverage. added missing require
Browse files Browse the repository at this point in the history
  • Loading branch information
rpbaltazar committed Dec 17, 2020
1 parent 344b039 commit 99ae4d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/apartment/log_subscriber.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'active_record/log_subscriber'

module Apartment
class LogSubscriber < ActiveRecord::LogSubscriber
def sql(event)
Expand Down
14 changes: 14 additions & 0 deletions spec/unit/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ def tenant_names_from_array(names)
expect(Apartment.seed_after_create).to be true
end

it 'should set tenant_presence_check' do
Apartment.configure do |config|
config.tenant_presence_check = true
end
expect(Apartment.tenant_presence_check).to be true
end

it 'should set active_record_log' do
Apartment.configure do |config|
config.active_record_log = true
end
expect(Apartment.active_record_log).to be true
end

context 'databases' do
let(:users_conf_hash) { { port: 5444 } }

Expand Down

0 comments on commit 99ae4d7

Please sign in to comment.