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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-18 00:08:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-18 00:08:29 +0300
commit40254b9ace2a74a3c9f1cc51a1b1d5e3e78c1ae9 (patch)
tree9b735ef933178be36d35088f3acab2d9b75dbbad /spec/requests/api/deployments_spec.rb
parent22a0d312ae82e7dda3073d5d1a5a766d7641738d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/deployments_spec.rb')
-rw-r--r--spec/requests/api/deployments_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/api/deployments_spec.rb b/spec/requests/api/deployments_spec.rb
index 9add328f6a8..d8fc234cbae 100644
--- a/spec/requests/api/deployments_spec.rb
+++ b/spec/requests/api/deployments_spec.rb
@@ -40,6 +40,18 @@ describe API::Deployments do
end
end
+ context 'with the environment filter specifed' do
+ it 'returns deployments for the environment' do
+ get(
+ api("/projects/#{project.id}/deployments", user),
+ params: { environment: deployment_1.environment.name }
+ )
+
+ expect(json_response.size).to eq(1)
+ expect(json_response.first['iid']).to eq(deployment_1.iid)
+ end
+ end
+
describe 'ordering' do
let(:order_by) { 'iid' }
let(:sort) { 'desc' }