diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-09 14:43:43 +0200 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-30 12:22:55 +0200 |
commit | b13502ef825ec6f105ab47a29e7d397636c4d03b (patch) | |
tree | 43c27c58b73ee24946b5f3c11fff0bdd94683b82 /spec | |
parent | 375072aa279f8e89a095b957005ae03ee1b0a7ff (diff) | |
download | gitlab-ce-b13502ef825ec6f105ab47a29e7d397636c4d03b.tar.gz |
Add test for linter values visibility
Diffstat (limited to 'spec')
-rw-r--r-- | spec/views/ci/lints/show.html.haml_spec.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/views/ci/lints/show.html.haml_spec.rb b/spec/views/ci/lints/show.html.haml_spec.rb new file mode 100644 index 00000000000..f1d91eab356 --- /dev/null +++ b/spec/views/ci/lints/show.html.haml_spec.rb @@ -0,0 +1,33 @@ +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 |