diff options
author | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-08-29 21:34:15 +0000 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-08-29 21:34:15 +0000 |
commit | b01c7ad291a81bc23d2c3fe7266eaf05de6cb434 (patch) | |
tree | 87f9ce5d469b330aa336f675194d1ce11b4b38c2 /spec/support/shared_examples | |
parent | a5b2a3786056ddf99de06c8315e9a42c3bf86cd5 (diff) | |
parent | 5af535d919c50951513f5859730afd924a01c29b (diff) | |
download | gitlab-ce-b01c7ad291a81bc23d2c3fe7266eaf05de6cb434.tar.gz |
Merge branch 'security-61974-limit-issue-comment-size' into 'master'
Limit the size of issuable description and comments
See merge request gitlab/gitlabhq!3267
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r-- | spec/support/shared_examples/models/concern/issuable_shared_examples.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/shared_examples/models/concern/issuable_shared_examples.rb b/spec/support/shared_examples/models/concern/issuable_shared_examples.rb new file mode 100644 index 00000000000..9604555c57d --- /dev/null +++ b/spec/support/shared_examples/models/concern/issuable_shared_examples.rb @@ -0,0 +1,8 @@ +shared_examples_for 'matches_cross_reference_regex? fails fast' do + it 'fails fast for long strings' do + # took well under 1 second in CI https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/3267#note_172823 + expect do + Timeout.timeout(3.seconds) { mentionable.matches_cross_reference_regex? } + end.not_to raise_error + end +end |