File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3+ require 'active_record/log_subscriber'
4+
35module Apartment
46 class LogSubscriber < ActiveRecord ::LogSubscriber
57 def sql ( event )
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments