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 Nov 22, 2024
1 parent 4ccddc0 commit 90082f3
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 @@ -129,6 +129,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 90082f3

Please sign in to comment.