From bc578c5f89ff9d8ec03fbbd014714f9d1e5cb172 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 18 Aug 2021 18:10:08 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/helpers/invite_members_helper_spec.rb | 38 ------------------------------ 1 file changed, 38 deletions(-) (limited to 'spec/helpers') diff --git a/spec/helpers/invite_members_helper_spec.rb b/spec/helpers/invite_members_helper_spec.rb index e08ce09702f..4f44acecbd9 100644 --- a/spec/helpers/invite_members_helper_spec.rb +++ b/spec/helpers/invite_members_helper_spec.rb @@ -126,42 +126,4 @@ RSpec.describe InviteMembersHelper do end end end - - context 'with group' do - let_it_be(:group) { create(:group) } - - describe "#invite_group_members?" do - context 'when the user is an owner' do - before do - group.add_owner(owner) - allow(helper).to receive(:current_user) { owner } - end - - it 'returns false' do - allow(helper).to receive(:experiment_enabled?).with(:invite_members_empty_group_version_a) { false } - - expect(helper.invite_group_members?(group)).to eq false - end - - it 'returns true' do - allow(helper).to receive(:experiment_enabled?).with(:invite_members_empty_group_version_a) { true } - - expect(helper.invite_group_members?(group)).to eq true - end - end - - context 'when the user is a developer' do - before do - group.add_developer(developer) - allow(helper).to receive(:current_user) { developer } - end - - it 'returns false' do - allow(helper).to receive(:experiment_enabled?).with(:invite_members_empty_group_version_a) { true } - - expect(helper.invite_group_members?(group)).to eq false - end - end - end - end end -- cgit v1.2.1