diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-06-09 19:47:17 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-06-09 19:47:17 +0300 |
commit | 6657aff24cd6595bf3a0a8ede52dcf91cf5fa079 (patch) | |
tree | b0d997b313a68f5fbfbd3ea9df0736ef01e11a32 | |
parent | 0d2d1bc8a8488e0295d9c7d05515ec226df378d0 (diff) | |
download | gitlab-ci-6657aff24cd6595bf3a0a8ede52dcf91cf5fa079.tar.gz |
specs
-rw-r--r-- | app/views/lints/show.html.haml | 3 | ||||
-rw-r--r-- | spec/features/lint_spec.rb | 20 |
2 files changed, 21 insertions, 2 deletions
diff --git a/app/views/lints/show.html.haml b/app/views/lints/show.html.haml index 0fc22aa..a3172b3 100644 --- a/app/views/lints/show.html.haml +++ b/app/views/lints/show.html.haml @@ -3,7 +3,7 @@ = form_tag '/lint', method: :post, remote: true do .control-group - = label_tag "Content of .gitlab-ci.yml", nil, class: 'control-label' + = label_tag "Content of .gitlab-ci.yml", :content, class: 'control-label' .controls = text_area_tag :content, nil, class: 'form-control span1', rows: 7, require: true @@ -23,4 +23,3 @@ $(".loading").show() $('form').bind 'ajax:complete', -> $(".loading").hide() - $(".submit-yml").reset() diff --git a/spec/features/lint_spec.rb b/spec/features/lint_spec.rb new file mode 100644 index 0000000..8f030d8 --- /dev/null +++ b/spec/features/lint_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "Lint" do + it "Yaml parsing", js: true do + + content = File.read(Rails.root.join('spec/support/gitlab_stubs/gitlab_ci.yml')) + visit lint_path + fill_in "content", with: content + click_on "Validate" + within "table" do + page.should have_content("Skip Refs") + page.should have_content("Job - Rspec") + page.should have_content("Job - Spinach") + page.should have_content("Deploy Job - cap deploy") + page.should have_content("Deploy Job - Deploy to staging") + end + + end + +end |