diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/controllers/projects/issues_controller_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/controllers/projects/issues_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 7569a18baeb..922ecb6052a 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -17,7 +17,7 @@ RSpec.describe Projects::IssuesController do before do sign_in(user) project.add_developer(user) - create(:jira_service, project: project) + create(:jira_integration, project: project) end context 'when GitLab issues disabled' do @@ -1016,10 +1016,13 @@ RSpec.describe Projects::IssuesController do let(:spammy_title) { 'Whatever' } let!(:spam_logs) { create_list(:spam_log, 2, user: user, title: spammy_title) } + before do + request.headers['X-GitLab-Captcha-Response'] = 'a-valid-captcha-response' + request.headers['X-GitLab-Spam-Log-Id'] = spam_logs.last.id + end + def update_verified_issue - update_issue( - issue_params: { title: spammy_title }, - additional_params: { spam_log_id: spam_logs.last.id, 'g-recaptcha-response': true }) + update_issue(issue_params: { title: spammy_title }) end it 'returns 200 status' do @@ -1036,8 +1039,9 @@ RSpec.describe Projects::IssuesController do it 'does not mark spam log as recaptcha_verified when it does not belong to current_user' do spam_log = create(:spam_log) + request.headers['X-GitLab-Spam-Log-Id'] = spam_log.id - expect { update_issue(issue_params: { spam_log_id: spam_log.id, 'g-recaptcha-response': true }) } + expect { update_issue } .not_to change { SpamLog.last.recaptcha_verified } end end |