summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-10-17 16:58:28 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-10-17 16:58:28 +0200
commit5ee58c1c0699530612dcd2abcb2a07f041f0fca9 (patch)
tree5e7c14faee2bcbc95d9fbb746fc1193382837c85 /spec
parent57d331d7514f36d5805a68ac7523d6a075d3e7a7 (diff)
downloadgitlab-ce-5ee58c1c0699530612dcd2abcb2a07f041f0fca9.tar.gz
Add short_revision and use total_size
Diffstat (limited to 'spec')
-rw-r--r--spec/fixtures/api/schemas/registry/tag.json5
-rw-r--r--spec/javascripts/registry/mock_data.js4
-rw-r--r--spec/serializers/container_tag_entity_spec.rb2
3 files changed, 8 insertions, 3 deletions
diff --git a/spec/fixtures/api/schemas/registry/tag.json b/spec/fixtures/api/schemas/registry/tag.json
index 5bc307e0e64..8998e223558 100644
--- a/spec/fixtures/api/schemas/registry/tag.json
+++ b/spec/fixtures/api/schemas/registry/tag.json
@@ -14,6 +14,11 @@
"revision": {
"type": "string"
},
+ "short_revision": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 8
+ },
"total_size": {
"type": "integer"
},
diff --git a/spec/javascripts/registry/mock_data.js b/spec/javascripts/registry/mock_data.js
index 18600d00bff..3a5ed787dd4 100644
--- a/spec/javascripts/registry/mock_data.js
+++ b/spec/javascripts/registry/mock_data.js
@@ -26,7 +26,7 @@ export const registryServerResponse = [
name: 'centos7',
short_revision: 'b118ab5b0',
revision: 'b118ab5b0e90b7cb5127db31d5321ac14961d097516a8e0e72084b6cdc783b43',
- size: 679,
+ total_size: 679,
layers: 19,
location: 'location',
created_at: 1505828744434,
@@ -36,7 +36,7 @@ export const registryServerResponse = [
name: 'centos6',
short_revision: 'b118ab5b0',
revision: 'b118ab5b0e90b7cb5127db31d5321ac14961d097516a8e0e72084b6cdc783b43',
- size: 679,
+ total_size: 679,
layers: 19,
location: 'location',
created_at: 1505828744434,
diff --git a/spec/serializers/container_tag_entity_spec.rb b/spec/serializers/container_tag_entity_spec.rb
index 6dcc5204516..4beb50c70f8 100644
--- a/spec/serializers/container_tag_entity_spec.rb
+++ b/spec/serializers/container_tag_entity_spec.rb
@@ -22,7 +22,7 @@ describe ContainerTagEntity do
end
it 'exposes required informations' do
- expect(subject).to include(:name, :location, :revision, :total_size, :created_at)
+ expect(subject).to include(:name, :location, :revision, :short_revision, :total_size, :created_at)
end
context 'when user can manage repositories' do