Commit 8b726212 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'fa-fix_related_epic_links_and_issue_links_fixtures' into 'master'

Fix related epic links and issue links spec fixtures

See merge request gitlab-org/gitlab!82623
parents f75a7eff ffc7df0c
......@@ -69,5 +69,5 @@
"required": [
"id", "iid", "group_id", "title", "confidential", "_links"
],
"additionalProperties": false
"additionalProperties": true
}
{
"type": "array",
"items": {
"type": "object",
"properties" : {
"$ref": "./related_epic_link.json"
}
}
}
{
"type": "array",
"items": {
"type": "object",
"allOf": [
{ "$ref": "epic.json" },
{
"required" : [
"link_type",
"related_epic_link_id",
"link_created_at",
"link_updated_at"
],
"properties" : {
"link_type": {
"type": "string",
"enum": ["relates_to", "blocks", "is_blocked_by"]
},
"related_epic_link_id": { "type": "integer" },
"link_created_at": { "type": "string" },
"link_updated_at": { "type": "string" }
}
}
]
}
}
......@@ -72,7 +72,7 @@ RSpec.describe API::RelatedEpicLinks do
expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to be_an Array
expect(json_response.length).to eq(2)
expect(response).to match_response_schema('public_api/v4/related_epic_links', dir: 'ee')
expect(response).to match_response_schema('public_api/v4/related_epics', dir: 'ee')
end
it 'returns multiple links without N + 1' do
......
{
"type": "array",
"items": {
"type": "object",
"properties" : {
"$ref": "./issue_link.json"
}
}
}
{
"type": "array",
"items": {
"type": "object",
"allOf": [
{ "$ref": "../../../../../../spec/fixtures/api/schemas/public_api/v4/issue.json" },
{
"required" : [
"link_type",
"issue_link_id",
"link_created_at",
"link_updated_at"
],
"properties" : {
"link_type": {
"type": "string",
"enum": ["relates_to", "blocks", "is_blocked_by"]
},
"issue_link_id": { "type": "integer" },
"link_created_at": { "type": "string" },
"link_updated_at": { "type": "string" }
}
}
]
}
}
......@@ -34,7 +34,7 @@ RSpec.describe API::IssueLinks do
expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to be_an Array
expect(json_response.length).to eq(2)
expect(response).to match_response_schema('public_api/v4/issue_links')
expect(response).to match_response_schema('public_api/v4/related_issues')
end
it 'returns multiple links without N + 1' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment