Skip to content

Commit

Permalink
[#92] added test coverage for bug report
Browse files Browse the repository at this point in the history
  • Loading branch information
rpbaltazar committed Jul 16, 2020
1 parent 97ec6c3 commit 029e174
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/examples/generic_adapter_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@

expect(num_available_connections).to eq(0)
end

it 'ensures apartment_adapter is properly set during init' do
Thread.current[:apartment_adapter] = Apartment::Adapters::AbstractAdapter.new(config)
Apartment::Railtie.config.to_prepare_blocks.map(&:call)
expect(Apartment::Tenant.adapter.class.name).to eq 'Apartment::Adapters::PostgresqlAdapter'
end
end

#
Expand Down

0 comments on commit 029e174

Please sign in to comment.