Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb32
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