Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
ef032bb9
Commit
ef032bb9
authored
Apr 22, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error on commit builds page when no builds yet
Closes #15509
parent
81cb636e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
app/views/projects/commit/_ci_commit.html.haml
app/views/projects/commit/_ci_commit.html.haml
+1
-1
spec/features/projects/commit/builds_spec.rb
spec/features/projects/commit/builds_spec.rb
+27
-0
No files found.
app/views/projects/commit/_ci_commit.html.haml
View file @
ef032bb9
...
@@ -16,7 +16,7 @@
...
@@ -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
...
...
spec/features/projects/commit/builds_spec.rb
0 → 100644
View file @
ef032bb9
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment