diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-05-14 15:49:09 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-05-14 15:49:09 +0300 |
commit | 7c3ca86370afd28306e5bcc6563ff03da0343536 (patch) | |
tree | 366873e8e1ddcb03911c4339c024fa99962c73ec /spec/requests/api/projects_spec.rb | |
parent | 5619c7b9687edbeb07f4f383bd0bd1a1d94a1b50 (diff) | |
download | gitlab-ce-7c3ca86370afd28306e5bcc6563ff03da0343536.tar.gz |
Add order option for projects API
Diffstat (limited to 'spec/requests/api/projects_spec.rb')
-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 |