Skip to content
Snippets Groups Projects
Commit b13502ef authored by Katarzyna Kobierska's avatar Katarzyna Kobierska
Browse files

Add test for linter values visibility

parent 375072aa
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -21,7 +21,7 @@
 
%br
%b Tag list:
= build[:tag_list]
= build[:tag_list] && build[:tag_list].join(", ")
%br
%b Refs only:
= build[:only] && build[:only].join(", ")
Loading
Loading
require 'spec_helper'
describe 'ci/lints/show' do
let(:content) do
{ build_template: {
script: './build.sh',
tags: ['dotnet'],
only: ['test@dude/repo'],
except: ['deploy'],
environment: 'testing'
}
}
end
let(:config_processor) { Ci::GitlabCiYamlProcessor.new(YAML.dump(content)) }
context 'when content is valid' do
before do
assign(:status, true)
assign(:builds, config_processor.builds)
assign(:stages, config_processor.stages)
end
it 'shows correct values' do
render
expect(rendered).to have_content('Tag list: dotnet')
expect(rendered).to have_content('Refs only: test@dude/repo')
expect(rendered).to have_content('Refs except: deploy')
expect(rendered).to have_content('Environment: testing')
expect(rendered).to have_content('When: on_success')
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment