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-04-02 03:08:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 03:08:11 +0300
commit93dcf45d441bc884b167f4338380c8c888e9b86f (patch)
treef55e8c1d39013380d1ff7d2a4e3cca537a35192a /spec/models
parent0e68afab211a172b862a7acc774e1eda5da8e471 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/user_spec.rb26
1 files changed, 1 insertions, 25 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index b21841ad034..61c871ead92 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -4263,30 +4263,6 @@ describe User, :do_not_mock_admin_mode do
end
describe '#read_only_attribute?' do
- context 'when LDAP server is enabled' do
- before do
- allow(Gitlab::Auth::Ldap::Config).to receive(:enabled?).and_return(true)
- end
-
- %i[name email location].each do |attribute|
- it "is true for #{attribute}" do
- expect(subject.read_only_attribute?(attribute)).to be_truthy
- end
- end
-
- context 'and ldap_readonly_attributes feature is disabled' do
- before do
- stub_feature_flags(ldap_readonly_attributes: false)
- end
-
- %i[name email location].each do |attribute|
- it "is false" do
- expect(subject.read_only_attribute?(attribute)).to be_falsey
- end
- end
- end
- end
-
context 'when synced attributes metadata is present' do
it 'delegates to synced_attributes_metadata' do
subject.build_user_synced_attributes_metadata
@@ -4297,7 +4273,7 @@ describe User, :do_not_mock_admin_mode do
end
end
- context 'when synced attributes metadata is present' do
+ context 'when synced attributes metadata is not present' do
it 'is false for any attribute' do
expect(subject.read_only_attribute?(:email)).to be_falsey
end