diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/models/issue_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r-- | spec/models/issue_spec.rb | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index af4c48775ec..17c3cd17364 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -150,8 +150,8 @@ RSpec.describe Issue do issue.confidential = false expect(issue).not_to be_valid - expect(issue.errors[:confidential]) - .to include('associated parent is confidential and can not have non-confidential children.') + expect(issue.errors[:base]) + .to include(_('A non-confidential issue cannot have a confidential parent.')) end it 'allows to make parent not-confidential' do @@ -172,8 +172,8 @@ RSpec.describe Issue do issue.confidential = true expect(issue).not_to be_valid - expect(issue.errors[:confidential]) - .to include('confidential parent can not be used if there are non-confidential children.') + expect(issue.errors[:base]) + .to include(_('A confidential issue cannot have a parent that already has non-confidential children.')) end it 'allows to make child confidential' do @@ -283,6 +283,14 @@ RSpec.describe Issue do create(:issue) end + + it_behaves_like 'issue_edit snowplow tracking' do + let(:issue) { create(:issue) } + let(:project) { issue.project } + let(:property) { Gitlab::UsageDataCounters::IssueActivityUniqueCounter::ISSUE_CREATED } + let(:user) { issue.author } + subject(:service_action) { issue } + end end context 'issue namespace' do @@ -1782,20 +1790,4 @@ RSpec.describe Issue do end end end - - describe '#full_search' do - context 'when searching non-english terms' do - [ - 'abc 中文語', - '中文語cn', - '中文語' - ].each do |term| - it 'adds extra where clause to match partial index' do - expect(described_class.full_search(term).to_sql).to include( - "AND (issues.title NOT SIMILAR TO '[\\u0000-\\u218F]*' OR issues.description NOT SIMILAR TO '[\\u0000-\\u218F]*')" - ) - end - end - end - end end |