From 0e4c0e7818e7ab19b6639bc4c44bc373ba8219d9 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Tue, 23 Aug 2016 12:56:24 +0200 Subject: Fix rubocop tests --- lib/ci/api/lint.rb | 3 +-- spec/requests/ci/api/lint_spec.rb | 2 +- 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') -- cgit v1.2.1