diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-04 03:16:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-04 03:16:09 +0000 |
commit | 242358bb7b8e031b9b975340750be33b19015cfa (patch) | |
tree | 55cf5342bc232ba517698a1f82e859d5fdf25fac /spec/models | |
parent | 517f254952ababb661160d3afd659902d18e29cd (diff) | |
download | gitlab-ce-242358bb7b8e031b9b975340750be33b19015cfa.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/application_setting_spec.rb | 10 |
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]) |