Fix feature specs: we always show the build status if ci_commit is present
This commit is contained in:
parent
58a56a0396
commit
742089ae04
|
@ -19,30 +19,13 @@ describe 'Commits' do
|
|||
let!(:build) { FactoryGirl.create :ci_build, commit: commit }
|
||||
|
||||
describe 'Project commits' do
|
||||
context 'builds enabled' do
|
||||
context '.gitlab-ci.yml found' do
|
||||
before do
|
||||
visit namespace_project_commits_path(project.namespace, project, :master)
|
||||
end
|
||||
before do
|
||||
visit namespace_project_commits_path(project.namespace, project, :master)
|
||||
end
|
||||
|
||||
it 'should show build status' do
|
||||
page.within("//li[@id='commit-#{commit.short_sha}']") do
|
||||
expect(page).to have_css(".ci-status-link")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'no .gitlab-ci.yml found' do
|
||||
before do
|
||||
stub_ci_commit_yaml_file(nil)
|
||||
visit namespace_project_commits_path(project.namespace, project, :master)
|
||||
end
|
||||
|
||||
it 'should not show build status' do
|
||||
page.within("//li[@id='commit-#{commit.short_sha}']") do
|
||||
expect(page).to have_no_css(".ci-status-link")
|
||||
end
|
||||
end
|
||||
it 'should show build status' do
|
||||
page.within("//li[@id='commit-#{commit.short_sha}']") do
|
||||
expect(page).to have_css(".ci-status-link")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue