diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-08 12:09:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-08 12:09:39 +0300 |
commit | 5bdbc604c8a08f827c3833e2c28ec0c299bb41fc (patch) | |
tree | 1fbf5e5dc3bff54d371baa15775371ebc8525f62 /spec/controllers | |
parent | 79ddf163588de2d9a7f1cc27262dc1a14503f619 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index a2df023fe4c..053932944bb 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -187,6 +187,33 @@ describe Projects::IssuesController do expect(assigns(:issue)).to be_a_new(Issue) end + where(:conf_value, :conf_result) do + [ + [true, true], + ['true', true], + ['TRUE', true], + [false, false], + ['false', false], + ['FALSE', false] + ] + end + + with_them do + it 'sets the confidential flag to the expected value' do + get :new, params: { + namespace_id: project.namespace, + project_id: project, + issue: { + confidential: conf_value + } + } + + assigned_issue = assigns(:issue) + expect(assigned_issue).to be_a_new(Issue) + expect(assigned_issue.confidential).to eq conf_result + end + end + it 'fills in an issue for a merge request' do project_with_repository = create(:project, :repository) project_with_repository.add_developer(user) |