Commit 00155b6c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Suppress warning about missing `.gitlab-ci.yml` if builds are disabled

When user disables GitLab Ci Service in project's settings then warning
about missing `.gitlab-ci.yml` file should be supressed. This a matter
of user experience as stated in #3761 (closes #3761).
parent c80f3425
...@@ -60,6 +60,7 @@ describe "Commits" do ...@@ -60,6 +60,7 @@ describe "Commits" do
end end
describe ".gitlab-ci.yml not found warning" do describe ".gitlab-ci.yml not found warning" do
context 'ci service enabled' do
it "does not show warning" do it "does not show warning" do
visit ci_status_path(@commit) visit ci_status_path(@commit)
expect(page).not_to have_content ".gitlab-ci.yml not found in this commit" expect(page).not_to have_content ".gitlab-ci.yml not found in this commit"
...@@ -71,5 +72,18 @@ describe "Commits" do ...@@ -71,5 +72,18 @@ describe "Commits" do
expect(page).to have_content ".gitlab-ci.yml not found in this commit" expect(page).to have_content ".gitlab-ci.yml not found in this commit"
end end
end end
context 'ci service disabled' do
before do
allow_any_instance_of(GitlabCiService).to receive(:active).and_return(false)
stub_ci_commit_yaml_file(nil)
visit ci_status_path(@commit)
end
it 'does not show warning' do
expect(page).not_to have_content '.gitlab-ci.yml not found in this commit'
end
end
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment