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/serializers/linked_project_issue_entity_spec.rb')
-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))