Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-04 06:16:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-04 06:16:09 +0300
commit242358bb7b8e031b9b975340750be33b19015cfa (patch)
tree55cf5342bc232ba517698a1f82e859d5fdf25fac /spec/models
parent517f254952ababb661160d3afd659902d18e29cd (diff)
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/application_setting_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb
index bcd8eccd68f..ab25608e2f0 100644
--- a/spec/models/application_setting_spec.rb
+++ b/spec/models/application_setting_spec.rb
@@ -650,6 +650,16 @@ RSpec.describe ApplicationSetting do
end
end
+ context 'when ApplicationSettings does not have a primary key' do
+ before do
+ allow(ActiveRecord::Base.connection).to receive(:primary_key).with(described_class.table_name).and_return(nil)
+ end
+
+ it 'raises an exception' do
+ expect { described_class.create_from_defaults }.to raise_error(/table is missing a primary key constraint/)
+ end
+ end
+
describe '#disabled_oauth_sign_in_sources=' do
before do
allow(Devise).to receive(:omniauth_providers).and_return([:github])