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/work_item_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/models/work_item_spec.rb')
-rw-r--r-- | spec/models/work_item_spec.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/spec/models/work_item_spec.rb b/spec/models/work_item_spec.rb index e2240c225a9..341f9a9c60f 100644 --- a/spec/models/work_item_spec.rb +++ b/spec/models/work_item_spec.rb @@ -59,6 +59,14 @@ RSpec.describe WorkItem do create(:work_item) end + + it_behaves_like 'issue_edit snowplow tracking' do + let(:work_item) { create(:work_item) } + let(:property) { Gitlab::UsageDataCounters::IssueActivityUniqueCounter::ISSUE_CREATED } + let(:project) { work_item.project } + let(:user) { work_item.author } + subject(:service_action) { work_item } + end end context 'work item namespace' do @@ -123,8 +131,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 +151,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 +170,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 |