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-05-26 06:09:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-26 06:09:21 +0300
commit47ef8c6c530ee1cac0e1046b098755ec949da894 (patch)
treed09c3d5598aad53c0f2c721ce237ff8b1db5f7ec /spec/serializers
parenteb90b0642d7949bfa03c8e9b5f39d211934fb0b5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/linked_project_issue_entity_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/serializers/linked_project_issue_entity_spec.rb b/spec/serializers/linked_project_issue_entity_spec.rb
index b28b00bd8e1..c4646754f16 100644
--- a/spec/serializers/linked_project_issue_entity_spec.rb
+++ b/spec/serializers/linked_project_issue_entity_spec.rb
@@ -25,6 +25,22 @@ RSpec.describe LinkedProjectIssueEntity do
it { is_expected.to include(link_type: 'relates_to') }
end
+ describe 'type' do
+ it 'returns the issue type' do
+ expect(serialized_entity).to include(type: 'ISSUE')
+ end
+
+ context 'when related issue is a task' do
+ before do
+ related_issue.update!(issue_type: :task, work_item_type: WorkItems::Type.default_by_type(:task))
+ end
+
+ it 'returns a work item issue type' do
+ expect(serialized_entity).to include(type: 'TASK')
+ end
+ end
+ end
+
describe 'path' do
it 'returns an issue path' do
expect(serialized_entity).to include(path: project_issue_path(related_issue.project, related_issue.iid))