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:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-03-17 17:50:20 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-02 20:11:51 +0300
commit8f32724fcb7f05052b53dcd365a064ad87a9535e (patch)
tree2435c287ed254d15d9fa4d58c7007e4fd7656fc4 /spec/requests
parent7fb3a78a6d23b1fe0b14fab30e1fac4ec8d27d85 (diff)
Ci::Pipeline to project.pipelines
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/pipelines_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb
index e3cda85b244..5e20a823d39 100644
--- a/spec/requests/api/pipelines_spec.rb
+++ b/spec/requests/api/pipelines_spec.rb
@@ -74,7 +74,7 @@ describe API::Pipelines do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).not_to be_empty
- expect(json_response.last['sha']).to eq(Ci::Pipeline.where(tag: false).last.sha)
+ expect(json_response.last['sha']).to eq(project.pipelines.where(tag: false).last.sha)
end
end
@@ -85,7 +85,7 @@ describe API::Pipelines do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).not_to be_empty
- expect(json_response.last['sha']).to eq(Ci::Pipeline.where(tag: true).last.sha)
+ expect(json_response.last['sha']).to eq(project.pipelines.where(tag: true).last.sha)
end
end
@@ -151,7 +151,7 @@ describe API::Pipelines do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
- expect(json_response.first['sha']).to eq(Ci::Pipeline.where(user: user1).order(id: :desc).first.sha)
+ expect(json_response.first['sha']).to eq(project.pipelines.where(user: user1).order(id: :desc).first.sha)
end
end
@@ -173,7 +173,7 @@ describe API::Pipelines do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
- expect(json_response.first['sha']).to eq(Ci::Pipeline.where(user: user1).order(id: :desc).first.sha)
+ expect(json_response.first['sha']).to eq(project.pipelines.where(user: user1).order(id: :desc).first.sha)
end
end
@@ -195,7 +195,7 @@ describe API::Pipelines do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
- expect(json_response.first['id']).to eq(Ci::Pipeline.where("yaml_errors IS NOT NULL").order(id: :desc).first.id)
+ expect(json_response.first['id']).to eq(project.pipelines.where("yaml_errors IS NOT NULL").order(id: :desc).first.id)
end
end
@@ -205,7 +205,7 @@ describe API::Pipelines do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
- expect(json_response.first['id']).to eq(Ci::Pipeline.where("yaml_errors IS NULL").order(id: :desc).first.id)
+ expect(json_response.first['id']).to eq(project.pipelines.where("yaml_errors IS NULL").order(id: :desc).first.id)
end
end
@@ -221,12 +221,12 @@ describe API::Pipelines do
context 'when order_by and sort are passed' do
context 'when order_by and sort are valid' do
it 'sorts pipelines' do
- get api("/projects/#{project.id}/pipelines?order_by=id&sort=asc", user)
+ get api("/projects/#{project.id}/pipelines?order_by=user_id&sort=asc", user)
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
- expect(json_response.first['id']).to eq(Ci::Pipeline.order(id: :asc).first.id)
- expect(json_response.last['id']).to eq(Ci::Pipeline.order(id: :asc).last.id)
+ expect(json_response.first['id']).to eq(project.pipelines.order(user_id: :asc).first.id)
+ expect(json_response.last['id']).to eq(project.pipelines.order(user_id: :asc).last.id)
end
end