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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 06:11:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 06:11:38 +0300
commitf3f9b9fe66f234528706fbe0e70a0e529b5d8d08 (patch)
treecbe31e5707e6be1d2197109df853050253fb0258 /spec/models
parentc95fc172145f1bdbc8d959b6cee31555fc545784 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/issue_spec.rb8
-rw-r--r--spec/models/work_item_spec.rb13
2 files changed, 11 insertions, 10 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index 15fe6d7625a..7faa8ea053c 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
diff --git a/spec/models/work_item_spec.rb b/spec/models/work_item_spec.rb
index e2240c225a9..b2c07ebc44e 100644
--- a/spec/models/work_item_spec.rb
+++ b/spec/models/work_item_spec.rb
@@ -123,8 +123,8 @@ RSpec.describe WorkItem do
child.confidential = false
expect(child).not_to be_valid
- expect(child.errors[:confidential])
- .to include('associated parent is confidential and can not have non-confidential children.')
+ expect(child.errors[:base])
+ .to include(_('A non-confidential work item cannot have a confidential parent.'))
end
it 'allows to make parent non-confidential' do
@@ -143,8 +143,9 @@ RSpec.describe WorkItem do
parent.confidential = true
expect(parent).not_to be_valid
- expect(parent.errors[:confidential])
- .to include('confidential parent can not be used if there are non-confidential children.')
+ expect(parent.errors[:base]).to include(
+ _('A confidential work item cannot have a parent that already has non-confidential children.')
+ )
end
it 'allows to make child confidential' do
@@ -161,8 +162,8 @@ RSpec.describe WorkItem do
child.work_item_parent = create(:work_item, confidential: true, project: project)
expect(child).not_to be_valid
- expect(child.errors[:confidential])
- .to include('associated parent is confidential and can not have non-confidential children.')
+ expect(child.errors[:base])
+ .to include('A non-confidential work item cannot have a confidential parent.')
end
end
end