From 2ed7b964fa56c14e4344530a1e6896c69dded58e Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 22 Dec 2015 08:49:12 +0100 Subject: Rename CI lint specs file --- spec/features/ci_lint_spec.rb | 39 +++++++++++++++++++++++++++++++++++++++ spec/features/lint_spec.rb | 39 --------------------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 spec/features/ci_lint_spec.rb delete mode 100644 spec/features/lint_spec.rb diff --git a/spec/features/ci_lint_spec.rb b/spec/features/ci_lint_spec.rb new file mode 100644 index 00000000000..441a3c702c7 --- /dev/null +++ b/spec/features/ci_lint_spec.rb @@ -0,0 +1,39 @@ +require 'spec_helper' + +describe 'CI Lint' do + before do + login_as :user + end + + describe 'YAML parsing', js: true do + before do + visit ci_lint_path + fill_in 'content', with: yaml_content + click_on 'Validate' + end + + context 'YAML is correct' do + let(:yaml_content) do + File.read(Rails.root.join('spec/support/gitlab_stubs/gitlab_ci.yml')) + end + + it 'Yaml parsing' do + within "table" do + expect(page).to have_content('Job - rspec') + expect(page).to have_content('Job - spinach') + expect(page).to have_content('Deploy Job - staging') + expect(page).to have_content('Deploy Job - production') + end + end + end + + context 'YAML is incorrect' do + let(:yaml_content) { '' } + + it 'displays information about an error' do + expect(page).to have_content('Status: syntax is incorrect') + expect(page).to have_content('Error: Please provide content of .gitlab-ci.yml') + end + end + end +end diff --git a/spec/features/lint_spec.rb b/spec/features/lint_spec.rb deleted file mode 100644 index 441a3c702c7..00000000000 --- a/spec/features/lint_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'spec_helper' - -describe 'CI Lint' do - before do - login_as :user - end - - describe 'YAML parsing', js: true do - before do - visit ci_lint_path - fill_in 'content', with: yaml_content - click_on 'Validate' - end - - context 'YAML is correct' do - let(:yaml_content) do - File.read(Rails.root.join('spec/support/gitlab_stubs/gitlab_ci.yml')) - end - - it 'Yaml parsing' do - within "table" do - expect(page).to have_content('Job - rspec') - expect(page).to have_content('Job - spinach') - expect(page).to have_content('Deploy Job - staging') - expect(page).to have_content('Deploy Job - production') - end - end - end - - context 'YAML is incorrect' do - let(:yaml_content) { '' } - - it 'displays information about an error' do - expect(page).to have_content('Status: syntax is incorrect') - expect(page).to have_content('Error: Please provide content of .gitlab-ci.yml') - end - end - end -end -- cgit v1.2.1