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
iv
gitlab-ce
Commits
0615de01
Commit
0615de01
authored
Sep 11, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ci commits features specs
parent
a8dd4d36
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
8 deletions
+23
-8
app/assets/stylesheets/ci/sections/builds.scss
app/assets/stylesheets/ci/sections/builds.scss
+8
-0
app/controllers/ci/commits_controller.rb
app/controllers/ci/commits_controller.rb
+1
-1
app/helpers/ci/commits_helper.rb
app/helpers/ci/commits_helper.rb
+5
-1
spec/features/ci/commits_spec.rb
spec/features/ci/commits_spec.rb
+9
-6
No files found.
app/assets/stylesheets/ci/sections/builds.scss
View file @
0615de01
...
...
@@ -52,3 +52,11 @@ pre.trace {
color
:
#777
;
}
}
.alert-disabled
{
background
:
#EEE
;
a
{
color
:
#3084bb
!
important
;
}
}
app/controllers/ci/commits_controller.rb
View file @
0615de01
...
...
@@ -21,7 +21,7 @@ module Ci
def
cancel
commit
.
builds
.
running_or_pending
.
each
(
&
:cancel
)
redirect_to
ci_project_ref_commit_path
(
project
,
commit
.
ref
,
commit
.
sha
)
redirect_to
ci_project_ref_commit
s
_path
(
project
,
commit
.
ref
,
commit
.
sha
)
end
private
...
...
app/helpers/ci/commits_helper.rb
View file @
0615de01
...
...
@@ -15,8 +15,12 @@ module Ci
end
end
def
ci_commit_path
(
commit
)
ci_project_ref_commits_path
(
commit
.
project
,
commit
.
ref
,
commit
.
sha
)
end
def
commit_link
(
commit
)
link_to
(
commit
.
short_sha
,
ci_
project_ref_commits_path
(
commit
.
project
,
commit
.
ref
,
commit
.
sha
))
link_to
(
commit
.
short_sha
,
ci_
commit_path
(
commit
))
end
def
truncate_first_line
(
message
,
length
=
50
)
...
...
spec/features/ci/commits_spec.rb
View file @
0615de01
require
'spec_helper'
describe
"Commits"
do
include
Ci
::
CommitsHelper
context
"Authenticated user"
do
before
do
login_as
:user
@project
=
FactoryGirl
.
create
:ci_project
@commit
=
FactoryGirl
.
create
:ci_commit
,
project:
@project
@build
=
FactoryGirl
.
create
:ci_build
,
commit:
@commit
login_as
:user
@project
.
gl_project
.
team
<<
[
@user
,
:master
]
end
describe
"GET /:project/commits/:sha"
do
before
do
visit
ci_
project_ref_commit_path
(
@project
,
@commit
.
ref
,
@commit
.
sha
)
visit
ci_
commit_path
(
@commit
)
end
it
{
expect
(
page
).
to
have_content
@commit
.
sha
[
0
..
7
]
}
...
...
@@ -21,7 +24,7 @@ describe "Commits" do
describe
"Cancel commit"
do
it
"cancels commit"
do
visit
ci_
project_ref_commit_path
(
@project
,
@commit
.
ref
,
@commit
.
sha
)
visit
ci_
commit_path
(
@commit
)
click_on
"Cancel"
expect
(
page
).
to
have_content
"canceled"
...
...
@@ -30,7 +33,7 @@ describe "Commits" do
describe
".gitlab-ci.yml not found warning"
do
it
"does not show warning"
do
visit
ci_
project_ref_commit_path
(
@project
,
@commit
.
ref
,
@commit
.
sha
)
visit
ci_
commit_path
(
@commit
)
expect
(
page
).
not_to
have_content
".gitlab-ci.yml not found in this commit"
end
...
...
@@ -39,7 +42,7 @@ describe "Commits" do
@commit
.
push_data
[
:ci_yaml_file
]
=
nil
@commit
.
save
visit
ci_
project_ref_commit_path
(
@project
,
@commit
.
ref
,
@commit
.
sha
)
visit
ci_
commit_path
(
@commit
)
expect
(
page
).
to
have_content
".gitlab-ci.yml not found in this commit"
end
...
...
@@ -55,7 +58,7 @@ describe "Commits" do
describe
"GET /:project/commits/:sha"
do
before
do
visit
ci_
project_ref_commit_path
(
@project
,
@commit
.
ref
,
@commit
.
sha
)
visit
ci_
commit_path
(
@commit
)
end
it
{
expect
(
page
).
to
have_content
@commit
.
sha
[
0
..
7
]
}
...
...
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