diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /spec/controllers/projects/issues_controller_spec.rb | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/controllers/projects/issues_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 68cccfa8bde..763c3e43e27 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -201,32 +201,6 @@ RSpec.describe Projects::IssuesController do expect(response).to have_gitlab_http_status(:ok) expect(json_response['issue_email_participants']).to contain_exactly({ "email" => participants[0].email }, { "email" => participants[1].email }) end - - context 'with the invite_members_in_comment experiment', :experiment do - context 'when user can invite' do - before do - stub_experiments(invite_members_in_comment: :invite_member_link) - project.add_maintainer(user) - end - - it 'assigns the candidate experience and tracks the event' do - expect(experiment(:invite_members_in_comment)).to track(:view, property: project.root_ancestor.id.to_s) - .for(:invite_member_link) - .with_context(namespace: project.root_ancestor) - .on_next_instance - - get :show, params: { namespace_id: project.namespace, project_id: project, id: issue.iid } - end - end - - context 'when user can not invite' do - it 'does not track the event' do - expect(experiment(:invite_members_in_comment)).not_to track(:view) - - get :show, params: { namespace_id: project.namespace, project_id: project, id: issue.iid } - end - end - end end describe 'GET #new' do @@ -1197,6 +1171,15 @@ RSpec.describe Projects::IssuesController do end end + context 'when trying to create a task' do + it 'defaults to issue type' do + issue = post_new_issue(issue_type: 'task') + + expect(issue.issue_type).to eq('issue') + expect(issue.work_item_type.base_type).to eq('issue') + end + end + it 'creates the issue successfully', :aggregate_failures do issue = post_new_issue |