summaryrefslogtreecommitdiff
path: root/spec/features/lint_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/lint_spec.rb')
-rw-r--r--spec/features/lint_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/lint_spec.rb b/spec/features/lint_spec.rb
new file mode 100644
index 00000000000..5d8f56e2cfb
--- /dev/null
+++ b/spec/features/lint_spec.rb
@@ -0,0 +1,28 @@
+require 'spec_helper'
+
+describe "Lint" do
+ before do
+ login_as :user
+ end
+
+ it "Yaml parsing", js: true do
+ content = File.read(Rails.root.join('spec/support/gitlab_stubs/gitlab_ci.yml'))
+ visit ci_lint_path
+ fill_in "content", with: content
+ click_on "Validate"
+ 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
+
+ it "Yaml parsing with error", js: true do
+ visit ci_lint_path
+ fill_in "content", with: ""
+ click_on "Validate"
+ expect(page).to have_content("Status: syntax is incorrect")
+ expect(page).to have_content("Error: Please provide content of .gitlab-ci.yml")
+ end
+end