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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-05-10 20:02:00 +0300
committerFilipa Lacerda <filipa@gitlab.com>2019-05-24 12:04:35 +0300
commit6ef27f77447ad389ca9b508909964c127fd38eeb (patch)
treeefd9aa2c7a1b029acc798fba446c1434ba9aa6bf /spec/serializers/deployment_entity_spec.rb
parenta96b9ebfbeb7926fdee632f0eeef9e09a63bec21 (diff)
Expose build environment latest deployable name and path
Diffstat (limited to 'spec/serializers/deployment_entity_spec.rb')
-rw-r--r--spec/serializers/deployment_entity_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb
index f0bbf90c6c6..37614cc0b4c 100644
--- a/spec/serializers/deployment_entity_spec.rb
+++ b/spec/serializers/deployment_entity_spec.rb
@@ -93,13 +93,22 @@ describe DeploymentEntity do
end
context 'when deployment details serialization was disabled' do
+ include Gitlab::Routing
+
let(:entity) do
described_class.new(deployment, request: request, deployment_details: false)
end
it 'does not serialize deployment details' do
expect(subject.with_indifferent_access)
- .not_to include(:commit, :deployable, :manual_actions, :scheduled_actions)
+ .not_to include(:commit, :manual_actions, :scheduled_actions)
+ end
+
+ it 'only exposes deployable name and path' do
+ project_job_path(project, deployment.deployable).tap do |path|
+ expect(subject.fetch(:deployable))
+ .to eq('name' => 'test', 'build_path' => path)
+ end
end
end
end