summaryrefslogtreecommitdiff
path: root/spec/lib/banzai
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 15:07:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 15:07:40 +0000
commitd83c512077b9eb391ce1f59349fc7bacc3615e18 (patch)
tree1864abd445bddfe750358b054d43b52a13675e17 /spec/lib/banzai
parenta72a9af092c1bfcf9f8024d59c11cf222f07e1e7 (diff)
downloadgitlab-ce-d83c512077b9eb391ce1f59349fc7bacc3615e18.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/banzai')
-rw-r--r--spec/lib/banzai/reference_parser/base_parser_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/banzai/reference_parser/base_parser_spec.rb b/spec/lib/banzai/reference_parser/base_parser_spec.rb
index 7897164d985..b1002c1db25 100644
--- a/spec/lib/banzai/reference_parser/base_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/base_parser_spec.rb
@@ -312,6 +312,12 @@ describe Banzai::ReferenceParser::BaseParser do
expect(subject.collection_objects_for_ids(Project, [project.id]))
.to eq([project])
end
+
+ it 'will not overflow the stack' do
+ ids = 1.upto(1_000_000).to_a
+
+ expect { subject.collection_objects_for_ids(User, ids) }.not_to raise_error
+ end
end
end