diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 03:09:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 03:09:20 +0300 |
commit | 72721699f11187199e89631ce0b5e3d2f7c167e9 (patch) | |
tree | b51a227be89d82aa24fc954e7b50e7b0933583cc /spec/lib/gitlab/database_spec.rb | |
parent | 06be418a7cd98a1c87c41ba43cca1ce9acbe885e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/database_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database_spec.rb b/spec/lib/gitlab/database_spec.rb index 4a0eab3ea27..b99f311de29 100644 --- a/spec/lib/gitlab/database_spec.rb +++ b/spec/lib/gitlab/database_spec.rb @@ -394,6 +394,12 @@ describe Gitlab::Database do expect(described_class.cached_table_exists?(:bogus_table_name)).to be_falsey end end + + it 'returns false when database does not exist' do + expect(ActiveRecord::Base).to receive(:connection) { raise ActiveRecord::NoDatabaseError, 'broken' } + + expect(described_class.cached_table_exists?(:projects)).to be(false) + end end describe '.exists?' do |