Skip to content

Commit

Permalink
Allow adapter to receive :execute with other statements, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
leboshi committed Sep 6, 2024
1 parent 02e46a0 commit 2b4c2dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/cluster/migration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@

it 'creates a table' do

allow_any_instance_of(ActiveRecord::ConnectionAdapters::ClickhouseAdapter).to receive(:execute).and_call_original

expect_any_instance_of(ActiveRecord::ConnectionAdapters::ClickhouseAdapter).to receive(:execute)
.with('ALTER TABLE some ON CLUSTER ' + connection_config[:cluster_name] + ' DROP INDEX idx')
.and_call_original
Expand Down

0 comments on commit 2b4c2dc

Please sign in to comment.