diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-14 20:25:39 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-14 20:25:39 +0000 |
commit | 740dc412506f80699cb9f82930d948fa961c6c05 (patch) | |
tree | a40e4f17c5db3b5edf27595310fcbae39398e3ae /spec | |
parent | aa4f085184f24272eef48e1da23557459957fbe7 (diff) | |
parent | 74710471046cc17163e5e0b3a6973d1f23c46bfa (diff) | |
download | gitlab-ce-740dc412506f80699cb9f82930d948fa961c6c05.tar.gz |
Merge branch 'project_api_order' into 'master'
Add order option for projects API
https://dev.gitlab.org/gitlab/gitlab-ci/issues/222
See merge request !656
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index cc387378d3a..aada7febf6c 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -86,6 +86,15 @@ describe API::API, api: true do expect(json_response).to be_an Array expect(json_response.first['id']).to eq(project3.id) end + + it 'returns projects in the correct order when ci_enabled_first parameter is passed' do + [project, project2, project3].each{ |project| project.build_missing_services } + project2.gitlab_ci_service.update(active: true, token: "token", project_url: "url") + get api('/projects', user), { ci_enabled_first: 'true'} + expect(response.status).to eq(200) + expect(json_response).to be_an Array + expect(json_response.first['id']).to eq(project2.id) + end end end end |