Skip to content

Commit 99ae4d7

Browse files
committed
[influitive#128] added config spec coverage. added missing require
1 parent 344b039 commit 99ae4d7

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/apartment/log_subscriber.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require 'active_record/log_subscriber'
4+
35
module Apartment
46
class LogSubscriber < ActiveRecord::LogSubscriber
57
def sql(event)

spec/unit/config_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ def tenant_names_from_array(names)
5050
expect(Apartment.seed_after_create).to be true
5151
end
5252

53+
it 'should set tenant_presence_check' do
54+
Apartment.configure do |config|
55+
config.tenant_presence_check = true
56+
end
57+
expect(Apartment.tenant_presence_check).to be true
58+
end
59+
60+
it 'should set active_record_log' do
61+
Apartment.configure do |config|
62+
config.active_record_log = true
63+
end
64+
expect(Apartment.active_record_log).to be true
65+
end
66+
5367
context 'databases' do
5468
let(:users_conf_hash) { { port: 5444 } }
5569

0 commit comments

Comments
 (0)