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
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-14 23:25:39 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-14 23:25:39 +0300
commit740dc412506f80699cb9f82930d948fa961c6c05 (patch)
treea40e4f17c5db3b5edf27595310fcbae39398e3ae /spec
parentaa4f085184f24272eef48e1da23557459957fbe7 (diff)
parent74710471046cc17163e5e0b3a6973d1f23c46bfa (diff)
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.rb9
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