Skip to content

Commit

Permalink
fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
PNixx committed Nov 29, 2023
1 parent 9eb2aa2 commit 0b591b5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions spec/cases/migration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,16 @@
end

describe 'drop table sync' do
migrations_dir = File.join(FIXTURES_PATH, 'migrations', 'dsl_drop_table_sync')
quietly { ClickhouseActiverecord::MigrationContext.new(migrations_dir, model.connection.schema_migration).up(1) }
it 'drops table' do
migrations_dir = File.join(FIXTURES_PATH, 'migrations', 'dsl_drop_table_sync')
quietly { ClickhouseActiverecord::MigrationContext.new(migrations_dir, model.connection.schema_migration).up(1) }

expect(ActiveRecord::Base.connection.tables).to include('some')
expect(ActiveRecord::Base.connection.tables).to include('some')

quietly { ClickhouseActiverecord::MigrationContext.new(migrations_dir, model.connection.schema_migration).up(2) }
quietly { ClickhouseActiverecord::MigrationContext.new(migrations_dir, model.connection.schema_migration).up(2) }

expect(ActiveRecord::Base.connection.tables).not_to include('some')
expect(ActiveRecord::Base.connection.tables).not_to include('some')
end
end

describe 'add column' do
Expand Down

0 comments on commit 0b591b5

Please sign in to comment.