diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-19 18:09:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-19 18:09:44 +0300 |
commit | 03a3b1a4caac4c04e81ee592fdb3b9c47dbb9623 (patch) | |
tree | 47c7119c90bdeed6ae1a6ad4510a2807d49223b8 /spec/views | |
parent | 0512d12bf15a0fc9b3ca29d7c854b34058d931a9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/layouts/header/_new_dropdown.haml_spec.rb | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/spec/views/layouts/header/_new_dropdown.haml_spec.rb b/spec/views/layouts/header/_new_dropdown.haml_spec.rb index 47abfff87bb..208da345e7f 100644 --- a/spec/views/layouts/header/_new_dropdown.haml_spec.rb +++ b/spec/views/layouts/header/_new_dropdown.haml_spec.rb @@ -6,33 +6,13 @@ RSpec.describe 'layouts/header/_new_dropdown' do let_it_be(:user) { create(:user) } shared_examples_for 'invite member quick link' do - context 'when an experiment is active' do - before do - allow(Gitlab::Experimentation).to receive(:active?).and_return(true) - allow(view).to receive(:experiment_tracking_category_and_group) - allow(view).to receive(:tracking_label) - end - - context 'with ability to invite members' do - it { is_expected.to have_link('Invite members', href: href) } - - it 'records the experiment' do - subject - - expect(view).to have_received(:experiment_tracking_category_and_group) - .with(:invite_members_new_dropdown) - expect(view).to have_received(:tracking_label) - end - end - - context 'without ability to invite members' do - let(:invite_member) { false } - - it { is_expected.not_to have_link('Invite members') } - end + context 'with ability to invite members' do + it { is_expected.to have_link('Invite members', href: href) } end - context 'when experiment is not active' do + context 'without ability to invite members' do + let(:invite_member) { false } + it { is_expected.not_to have_link('Invite members') } end end @@ -72,7 +52,6 @@ RSpec.describe 'layouts/header/_new_dropdown' do allow(view).to receive(:can?).with(user, :create_projects, group).and_return(true) allow(view).to receive(:can?).with(user, :admin_group_member, group).and_return(invite_member) allow(view).to receive(:can_admin_project_member?).and_return(invite_member) - allow(view).to receive(:experiment_enabled?) end subject do |