diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-16 03:06:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-16 03:06:14 +0300 |
commit | 07d7b8f58c63ddc55b005daeb0910d31970b3d88 (patch) | |
tree | 13d2a56938eed8e6d083b648e394d78d67bedf23 /spec/requests/api/deployments_spec.rb | |
parent | ae50a43c43229442e5ccef4034d62df8a3c36cbc (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.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/requests/api/deployments_spec.rb b/spec/requests/api/deployments_spec.rb index 21c073280f7..26849c0991d 100644 --- a/spec/requests/api/deployments_spec.rb +++ b/spec/requests/api/deployments_spec.rb @@ -12,9 +12,9 @@ describe API::Deployments do describe 'GET /projects/:id/deployments' do let(:project) { create(:project) } - let!(:deployment_1) { create(:deployment, :success, project: project, iid: 11, ref: 'master', created_at: Time.now) } - let!(:deployment_2) { create(:deployment, :success, project: project, iid: 12, ref: 'feature', created_at: 1.day.ago) } - let!(:deployment_3) { create(:deployment, :success, project: project, iid: 8, ref: 'patch', created_at: 2.days.ago) } + let!(:deployment_1) { create(:deployment, :success, project: project, iid: 11, ref: 'master', created_at: Time.now, updated_at: Time.now) } + let!(:deployment_2) { create(:deployment, :success, project: project, iid: 12, ref: 'feature', created_at: 1.day.ago, updated_at: 2.hours.ago) } + let!(:deployment_3) { create(:deployment, :success, project: project, iid: 8, ref: 'patch', created_at: 2.days.ago, updated_at: 1.hour.ago) } context 'as member of the project' do it 'returns projects deployments sorted by id asc' do @@ -57,6 +57,8 @@ describe API::Deployments do 'iid' | 'desc' | [:deployment_2, :deployment_1, :deployment_3] 'ref' | 'asc' | [:deployment_2, :deployment_1, :deployment_3] 'ref' | 'desc' | [:deployment_3, :deployment_1, :deployment_2] + 'updated_at' | 'asc' | [:deployment_2, :deployment_3, :deployment_1] + 'updated_at' | 'desc' | [:deployment_1, :deployment_3, :deployment_2] end with_them do |