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
Tatuya Kamada
gitlab-ce
Commits
826862d4
Commit
826862d4
authored
Aug 03, 2016
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests for release status heading on MR#show
parent
49f72e70
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+2
-2
spec/views/projects/merge_requests/_heading.html.haml_spec.rb
.../views/projects/merge_requests/_heading.html.haml_spec.rb
+23
-0
No files found.
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
826862d4
...
...
@@ -15,8 +15,8 @@
=
link_to
"View details"
,
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
"js-show-tab"
,
data:
{
action:
'builds'
}
-
elsif
@merge_request
.
has_ci?
//
Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
//
Remove in later versions when services like Jenkins will set CI status via Commit status API
-
#
Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
-
#
Remove in later versions when services like Jenkins will set CI status via Commit status API
.mr-widget-heading
-
%w[success skipped canceled failed running pending]
.
each
do
|
status
|
.ci_widget
{
class:
"ci-#{status}"
,
style:
"display:none"
}
...
...
spec/views/projects/merge_requests/_heading.html.haml_spec.rb
0 → 100644
View file @
826862d4
require
'spec_helper'
describe
'projects/merge_requests/widget/_heading'
do
include
Devise
::
TestHelpers
context
'when released to an environment'
do
let
(
:project
)
{
merge_request
.
target_project
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:merged
)
}
let
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let!
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
sha:
'a5391128b0ef5d21df5dd23d98557f4ef12fae20'
)
}
before
do
assign
(
:merge_request
,
merge_request
)
render
end
it
'displays that the environment is deployed'
do
expect
(
rendered
).
to
match
(
'Released to'
)
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