2019-09-04 21:01:54 +05:30
|
|
|
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
|
2019-12-20 00:11:08 +05:30
|
|
|
Timeout.timeout(6.seconds) { mentionable.matches_cross_reference_regex? }
|
2019-09-04 21:01:54 +05:30
|
|
|
end.not_to raise_error
|
|
|
|
end
|
|
|
|
end
|