Commit 0e4c0e78 authored by Katarzyna Kobierska's avatar Katarzyna Kobierska

Fix rubocop tests

parent 895ca3a7
...@@ -4,7 +4,6 @@ module Ci ...@@ -4,7 +4,6 @@ module Ci
before { authenticate! } before { authenticate! }
resources :lint do resources :lint do
post do post do
begin begin
response = {} response = {}
...@@ -20,7 +19,7 @@ module Ci ...@@ -20,7 +19,7 @@ module Ci
status: "syntax is correct" status: "syntax is correct"
} }
stage_builds = @stages.each do |stage| @stages.each do |stage|
response["#{stage}"] = @builds.select { |build| build[:stage] == stage } response["#{stage}"] = @builds.select { |build| build[:stage] == stage }
end end
else else
......
...@@ -31,7 +31,7 @@ describe Ci::API::API do ...@@ -31,7 +31,7 @@ describe Ci::API::API do
context "with invalid .gitlab_ci.yml content" do context "with invalid .gitlab_ci.yml content" do
it "validate 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(response).to have_http_status(500)
expect(json_response['status']).to eq('syntax is incorrect') expect(json_response['status']).to eq('syntax is incorrect')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment