From 9f46488805e86b1bc341ea1620b866016c2ce5ed Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 20 May 2020 14:34:42 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-0-stable-ee --- spec/views/profiles/show.html.haml_spec.rb | 44 ------------------------------ 1 file changed, 44 deletions(-) (limited to 'spec/views/profiles/show.html.haml_spec.rb') diff --git a/spec/views/profiles/show.html.haml_spec.rb b/spec/views/profiles/show.html.haml_spec.rb index e1c21f87780..14e6feed3ab 100644 --- a/spec/views/profiles/show.html.haml_spec.rb +++ b/spec/views/profiles/show.html.haml_spec.rb @@ -19,48 +19,4 @@ describe 'profiles/show' do expect(rendered).to have_field('user_id', with: user.id) end end - - context 'gitlab.com organization field' do - before do - allow(Gitlab).to receive(:com?).and_return(true) - end - - context 'when `:gitlab_employee_badge` feature flag is enabled' do - context 'and when user has an `@gitlab.com` email address' do - let(:user) { create(:user, email: 'test@gitlab.com') } - - it 'displays the organization field as `readonly` with a `value` of `GitLab`' do - render - - expect(rendered).to have_selector('#user_organization[readonly][value="GitLab"]') - end - end - - context 'and when a user does not have an `@gitlab.com` email' do - let(:user) { create(:user, email: 'test@example.com') } - - it 'displays an editable organization field' do - render - - expect(rendered).to have_selector('#user_organization:not([readonly]):not([value="GitLab"])') - end - end - end - - context 'when `:gitlab_employee_badge` feature flag is disabled' do - before do - stub_feature_flags(gitlab_employee_badge: false) - end - - context 'and when a user has an `@gitlab.com` email' do - let(:user) { create(:user, email: 'test@gitlab.com') } - - it 'displays an editable organization field' do - render - - expect(rendered).to have_selector('#user_organization:not([readonly]):not([value="GitLab"])') - end - end - end - end end -- cgit v1.2.1