diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 15:10:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 15:10:29 +0300 |
commit | 62c78157be8fe8888787162293f13945a5fa5d3e (patch) | |
tree | bcb134ee4b4a543b27341063fc6adb804dc3a3f4 /spec/support_specs/database | |
parent | 063d4b1caa1d04f50b2ba3290376de64dbb5fb07 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support_specs/database')
-rw-r--r-- | spec/support_specs/database/multiple_databases_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support_specs/database/multiple_databases_spec.rb b/spec/support_specs/database/multiple_databases_spec.rb index a8692e315fe..66056359458 100644 --- a/spec/support_specs/database/multiple_databases_spec.rb +++ b/spec/support_specs/database/multiple_databases_spec.rb @@ -42,7 +42,7 @@ RSpec.describe 'Database::MultipleDatabases' do context 'when reconnect is true' do it 'does not raise exception' do with_reestablished_active_record_base(reconnect: true) do - expect { ActiveRecord::Base.connection.execute("SELECT 1") }.not_to raise_error # rubocop:disable Database/MultipleDatabases + expect { ApplicationRecord.connection.execute("SELECT 1") }.not_to raise_error end end end @@ -50,7 +50,7 @@ RSpec.describe 'Database::MultipleDatabases' do context 'when reconnect is false' do it 'does raise exception' do with_reestablished_active_record_base(reconnect: false) do - expect { ActiveRecord::Base.connection.execute("SELECT 1") }.to raise_error(ActiveRecord::ConnectionNotEstablished) # rubocop:disable Database/MultipleDatabases + expect { ApplicationRecord.connection.execute("SELECT 1") }.to raise_error(ActiveRecord::ConnectionNotEstablished) end end end |