diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-19 09:11:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-19 09:11:52 +0300 |
commit | 8b13b280f53bc4895c2e92b7dae7b23a95480104 (patch) | |
tree | e9befae6f7b7d81f549f09b6491481ca8f232fb0 /spec/helpers | |
parent | bf53a3fd78390334ea7af084a64f74bf83c985e0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/invite_members_helper_spec.rb | 56 | ||||
-rw-r--r-- | spec/helpers/members_helper_spec.rb | 6 |
2 files changed, 0 insertions, 62 deletions
diff --git a/spec/helpers/invite_members_helper_spec.rb b/spec/helpers/invite_members_helper_spec.rb index abf8b65dc1e..7cf9ffa0621 100644 --- a/spec/helpers/invite_members_helper_spec.rb +++ b/spec/helpers/invite_members_helper_spec.rb @@ -65,62 +65,6 @@ RSpec.describe InviteMembersHelper do expect(helper.common_invite_modal_dataset(project)).to include(attributes) end - - context 'with tasks_to_be_done' do - using RSpec::Parameterized::TableSyntax - - subject(:output) { helper.common_invite_modal_dataset(source) } - - shared_examples_for 'including the tasks to be done attributes' do - it 'includes the tasks to be done attributes when expected' do - if expected? - expect(output[:tasks_to_be_done_options]).to eq( - [ - { value: :code, text: 'Create/import code into a project (repository)' }, - { value: :ci, text: 'Set up CI/CD pipelines to build, test, deploy, and monitor code' }, - { value: :issues, text: 'Create/import issues (tickets) to collaborate on ideas and plan work' } - ].to_json - ) - expect(output[:projects]).to eq([{ id: project.id, title: project.title }].to_json) - expect(output[:new_project_path]).to eq( - source.is_a?(Project) ? '' : new_project_path(namespace_id: group.id) - ) - else - expect(output[:tasks_to_be_done_options]).to be_nil - expect(output[:projects]).to be_nil - expect(output[:new_project_path]).to be_nil - end - end - end - - context 'when inviting members for tasks' do - where(:open_modal_param?, :logged_in?, :expected?) do - true | true | true - true | false | false - false | true | false - false | false | false - end - - with_them do - before do - allow(helper).to receive(:current_user).and_return(developer) if logged_in? - allow(helper).to receive(:params).and_return({ open_modal: 'invite_members_for_task' }) if open_modal_param? - end - - context 'when the source is a project' do - let_it_be(:source) { project } - - it_behaves_like 'including the tasks to be done attributes' - end - - context 'when the source is a group' do - let_it_be(:source) { group } - - it_behaves_like 'including the tasks to be done attributes' - end - end - end - end end context 'with project' do diff --git a/spec/helpers/members_helper_spec.rb b/spec/helpers/members_helper_spec.rb index 005fce1730f..68a12d8dbf7 100644 --- a/spec/helpers/members_helper_spec.rb +++ b/spec/helpers/members_helper_spec.rb @@ -69,12 +69,6 @@ RSpec.describe MembersHelper do it { expect(leave_confirmation_message(group)).to eq "Are you sure you want to leave the \"#{group.name}\" group?" } end - describe '#localized_tasks_to_be_done_choices' do - it 'has a translation for all `TASKS_TO_BE_DONE` keys' do - expect(localized_tasks_to_be_done_choices).to include(*MemberTask::TASKS.keys) - end - end - describe '#member_request_access_link' do let(:project) { create(:project) } let(:group) { create(:group) } |