From 0e3f7927d5b970ec18f8ce7a3a08ee0f9001f1d7 Mon Sep 17 00:00:00 2001 From: winniehell Date: Wed, 7 Sep 2016 13:40:14 +0200 Subject: Add failing test for #14360 --- spec/helpers/search_helper_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/helpers/search_helper_spec.rb') diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb index b0bb991539b..4b2ca3514f8 100644 --- a/spec/helpers/search_helper_spec.rb +++ b/spec/helpers/search_helper_spec.rb @@ -32,6 +32,10 @@ describe SearchHelper do expect(search_autocomplete_opts("adm").size).to eq(1) end + it "does not allow regular expression in search term" do + expect(search_autocomplete_opts("(webhooks|api)").size).to eq(0) + end + it "includes the user's groups" do create(:group).add_owner(user) expect(search_autocomplete_opts("gro").size).to eq(1) -- cgit v1.2.1