summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-08-23 12:56:24 +0200
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-09-07 12:10:49 +0200
commit0e4c0e7818e7ab19b6639bc4c44bc373ba8219d9 (patch)
tree6e45091040c37deedc9d914085d49d90e5b2c8e1
parent895ca3a74144d4f858b342d1dd4313faeae79229 (diff)
downloadgitlab-ce-0e4c0e7818e7ab19b6639bc4c44bc373ba8219d9.tar.gz
Fix rubocop tests
-rw-r--r--lib/ci/api/lint.rb3
-rw-r--r--spec/requests/ci/api/lint_spec.rb2
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/ci/api/lint.rb b/lib/ci/api/lint.rb
index 53a80318195..fab4f8d5925 100644
--- a/lib/ci/api/lint.rb
+++ b/lib/ci/api/lint.rb
@@ -4,7 +4,6 @@ module Ci
before { authenticate! }
resources :lint do
-
post do
begin
response = {}
@@ -20,7 +19,7 @@ module Ci
status: "syntax is correct"
}
- stage_builds = @stages.each do |stage|
+ @stages.each do |stage|
response["#{stage}"] = @builds.select { |build| build[:stage] == stage }
end
else
diff --git a/spec/requests/ci/api/lint_spec.rb b/spec/requests/ci/api/lint_spec.rb
index 9bd8154ce6d..4a18fd0b6b3 100644
--- a/spec/requests/ci/api/lint_spec.rb
+++ b/spec/requests/ci/api/lint_spec.rb
@@ -31,7 +31,7 @@ describe Ci::API::API do
context "with invalid .gitlab_ci.yml content" do
it "validate content" do
- post ci_api('/lint'), { private_token: user.private_token, content: 'invalid content'}
+ post ci_api('/lint'), { private_token: user.private_token, content: 'invalid content' }
expect(response).to have_http_status(500)
expect(json_response['status']).to eq('syntax is incorrect')