parent
81cb636e4f
commit
ef032bb9f1
2 changed files with 28 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
- if defined?(link_to_commit) && link_to_commit
|
- if defined?(link_to_commit) && link_to_commit
|
||||||
for commit
|
for commit
|
||||||
= link_to ci_commit.short_sha, namespace_project_commit_path(@project.namespace, @project, ci_commit.sha), class: "monospace"
|
= link_to ci_commit.short_sha, namespace_project_commit_path(@project.namespace, @project, ci_commit.sha), class: "monospace"
|
||||||
- if ci_commit.duration > 0
|
- if ci_commit.duration
|
||||||
in
|
in
|
||||||
= time_interval_in_words ci_commit.duration
|
= time_interval_in_words ci_commit.duration
|
||||||
|
|
||||||
|
|
27
spec/features/projects/commit/builds_spec.rb
Normal file
27
spec/features/projects/commit/builds_spec.rb
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
feature 'project commit builds' do
|
||||||
|
given(:project) { create(:project) }
|
||||||
|
|
||||||
|
background do
|
||||||
|
user = create(:user)
|
||||||
|
project.team << [user, :master]
|
||||||
|
login_as(user)
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when no builds triggered yet' do
|
||||||
|
background do
|
||||||
|
create(:ci_commit, project: project,
|
||||||
|
sha: project.commit.sha,
|
||||||
|
ref: 'master')
|
||||||
|
end
|
||||||
|
|
||||||
|
scenario 'user views commit builds page' do
|
||||||
|
visit builds_namespace_project_commit_path(project.namespace,
|
||||||
|
project, project.commit.sha)
|
||||||
|
|
||||||
|
|
||||||
|
expect(page).to have_content('Builds')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue