BigW Consortium Gitlab

Fix static analysis offences

parent 1dde609c
module Ci
class BuildMetadataPresenter < Gitlab::View::Presenter::Delegated
TIMEOUT_SOURCES = {
unknown_timeout_source: nil,
project_timeout_source: 'project',
......@@ -13,8 +12,7 @@ module Ci
return unless metadata.timeout_source?
TIMEOUT_SOURCES[metadata.timeout_source.to_sym] ||
metadata.timeout_source
metadata.timeout_source
end
end
end
module Ci
class BuildPresenter < Gitlab::View::Presenter::Delegated
presents :build
def erased_by_user?
......
class BuildMetadataEntity < Grape::Entity
expose :used_timeout_human_readable do |metadata|
metadata.used_timeout_human_readable unless metadata.used_timeout.nil?
end
......
......@@ -53,5 +53,4 @@ describe('Sidebar detail row', () => {
it('should render help when helpUrl is provided', () => {
expect(vm.$el.querySelector('.help-button a').getAttribute('href')).toEqual('help url');
});
});
......@@ -39,7 +39,8 @@ end
describe 'ChronicDurationAttribute' do
let(:source_field) {:maximum_job_timeout}
let(:virtual_field) {:maximum_job_timeout_human_readable}
subject {Ci::Runner.new}
subject { Ci::Runner.new }
it_behaves_like 'ChronicDurationAttribute reader'
it_behaves_like 'ChronicDurationAttribute writer'
......
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