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
Jérome Perrin
gitlab-ce
Commits
ceaafd3a
Commit
ceaafd3a
authored
Oct 28, 2016
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add commit_box spec
parent
3f979481
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
spec/views/projects/commit/_commit_box.html.haml_spec.rb
spec/views/projects/commit/_commit_box.html.haml_spec.rb
+28
-0
No files found.
spec/views/projects/commit/_commit_box.html.haml_spec.rb
0 → 100644
View file @
ceaafd3a
require
'spec_helper'
describe
'projects/commit/_commit_box.html.haml'
do
include
Devise
::
Test
::
ControllerHelpers
let
(
:project
)
{
create
(
:project
)
}
before
do
assign
(
:project
,
project
)
assign
(
:commit
,
project
.
commit
)
end
it
'shows the commit SHA'
do
render
expect
(
rendered
).
to
have_text
(
"Commit
#{
Commit
.
truncate_sha
(
project
.
commit
.
sha
)
}
"
)
end
it
'shows the last pipeline that ran for the commit'
do
first_pipeline
=
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
status:
'success'
)
second_pipeline
=
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
status:
'canceled'
)
third_pipeline
=
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
status:
'failed'
)
render
expect
(
rendered
).
to
have_text
(
"Pipeline #
#{
third_pipeline
.
id
}
for
#{
Commit
.
truncate_sha
(
project
.
commit
.
sha
)
}
failed"
)
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