diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-07 10:58:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-07 10:58:52 +0300 |
commit | 5bf5e1293ad952357635460431cbc4b27340034d (patch) | |
tree | 2e7750ea52207de92ae712be694a30db98be3151 /spec/models | |
parent | be44a258256ec9ba12876f56449078fcbb1431e0 (diff) |
Add latest changes from gitlab-org/gitlab@16-6-stable-ee
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/concerns/pg_full_text_searchable_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/concerns/pg_full_text_searchable_spec.rb b/spec/models/concerns/pg_full_text_searchable_spec.rb index 8e3b65cf125..7da48489e12 100644 --- a/spec/models/concerns/pg_full_text_searchable_spec.rb +++ b/spec/models/concerns/pg_full_text_searchable_spec.rb @@ -146,6 +146,16 @@ RSpec.describe PgFullTextSearchable, feature_category: :global_search do expect(model_class.pg_full_text_search('123')).to contain_exactly(with_dash) end end + + context 'when text has XML tags' do + let(:with_xml) { model_class.create!(project: project, namespace: project.project_namespace, title: '<rain>go away</rain>', description: 'description') } + + it 'removes XML tag syntax' do + with_xml.update_search_data! + + expect(model_class.pg_full_text_search('rain')).to contain_exactly(with_xml) + end + end end describe '#update_search_data!' do |