summaryrefslogtreecommitdiff
path: root/spec/fixtures
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-01-04 15:29:04 +0900
committerShinya Maeda <shinya@gitlab.com>2019-01-07 14:07:05 +0900
commit6bd7e1b8761bb837b7d1e81b392085a862bd1433 (patch)
tree3a8c6abb4f81ab2db6f06e7fae6fff6659cdf61c /spec/fixtures
parent124905e23b6d23253aee461f9d89d434a7b5b44b (diff)
downloadgitlab-ce-6bd7e1b8761bb837b7d1e81b392085a862bd1433.tar.gz
Add tests for Release Link API
Add tests for the API and add a couple of tests Add revert revert
Diffstat (limited to 'spec/fixtures')
-rw-r--r--spec/fixtures/api/schemas/release.json10
-rw-r--r--spec/fixtures/api/schemas/release/link.json11
-rw-r--r--spec/fixtures/api/schemas/release/links.json4
3 files changed, 16 insertions, 9 deletions
diff --git a/spec/fixtures/api/schemas/release.json b/spec/fixtures/api/schemas/release.json
index 45fa8b074d4..86f0f27606c 100644
--- a/spec/fixtures/api/schemas/release.json
+++ b/spec/fixtures/api/schemas/release.json
@@ -15,15 +15,7 @@
},
"assets": {
"count": { "type": "integer" },
- "links": {
- "type": "array",
- "items": {
- "id": "integer",
- "name": "string",
- "url": "string",
- "external": "boolean"
- }
- },
+ "links": { "$ref": "release/links.json" },
"sources": {
"type": "array",
"items": {
diff --git a/spec/fixtures/api/schemas/release/link.json b/spec/fixtures/api/schemas/release/link.json
new file mode 100644
index 00000000000..97347cb91cc
--- /dev/null
+++ b/spec/fixtures/api/schemas/release/link.json
@@ -0,0 +1,11 @@
+{
+ "type": "object",
+ "required": ["name", "url"],
+ "properties": {
+ "id": { "type": "integer" },
+ "name": { "type": "string" },
+ "url": { "type": "string" },
+ "external": { "type": "boolean" }
+ },
+ "additionalProperties": false
+}
diff --git a/spec/fixtures/api/schemas/release/links.json b/spec/fixtures/api/schemas/release/links.json
new file mode 100644
index 00000000000..766bc7ce20a
--- /dev/null
+++ b/spec/fixtures/api/schemas/release/links.json
@@ -0,0 +1,4 @@
+{
+ "type": "array",
+ "items": { "$ref": "link.json" }
+}