diff options
author | Stan Hu <stanhu@gmail.com> | 2017-06-10 03:28:30 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-06-10 03:43:02 -0700 |
commit | a7e82cbd61c613ebd2d6a8efe464400d2da13faf (patch) | |
tree | 5e78784b42cc2e870d45ae32470d39bf0329ad75 /spec/controllers | |
parent | b134f950d70bdb73bc76e9a9091c0a50a6b8b8cd (diff) | |
download | gitlab-ce-a7e82cbd61c613ebd2d6a8efe464400d2da13faf.tar.gz |
Make sure reCAPTCHA configuration is loaded when spam checks are initiatedsh-recaptcha-fix-try2
Previously it was possible when an issue was updated and Akismet flagged it as spam
that the reCAPTCHA configuration was not loaded.
Closes #33532
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index a38ae2eb990..b65e9e0dfc0 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -260,6 +260,7 @@ describe Projects::IssuesController do before { allow_any_instance_of(described_class).to receive(:verify_recaptcha).and_return(false) } it 'rejects an issue recognized as a spam' do + expect(Gitlab::Recaptcha).to receive(:load_configurations!).and_return(true) expect { update_spam_issue }.not_to change{ issue.reload.title } end |