diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/support/shared_examples/models/resource_event_shared_examples.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/support/shared_examples/models/resource_event_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/models/resource_event_shared_examples.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/shared_examples/models/resource_event_shared_examples.rb b/spec/support/shared_examples/models/resource_event_shared_examples.rb index 80806ee768a..8cab2de076d 100644 --- a/spec/support/shared_examples/models/resource_event_shared_examples.rb +++ b/spec/support/shared_examples/models/resource_event_shared_examples.rb @@ -161,3 +161,15 @@ RSpec.shared_examples 'a resource event for merge requests' do end end end + +RSpec.shared_examples 'a note for work item resource event' do + let_it_be(:user) { create(:user) } + let_it_be(:project) { create(:project) } + let_it_be(:work_item) { create(:work_item, :task, project: project, author: user) } + + it 'builds synthetic note with correct synthetic_note_class' do + event = build(described_class.name.underscore.to_sym, issue: work_item) + + expect(event.work_item_synthetic_system_note.class.name).to eq(event.synthetic_note_class.name) + end +end |