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
9ed7171a
Commit
9ed7171a
authored
Nov 17, 2016
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix builds/show spec; use iid instead of id
parent
43906336
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
app/helpers/environment_helper.rb
app/helpers/environment_helper.rb
+1
-1
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+1
-1
spec/views/projects/builds/show.html.haml_spec.rb
spec/views/projects/builds/show.html.haml_spec.rb
+8
-4
No files found.
app/helpers/environment_helper.rb
View file @
9ed7171a
...
...
@@ -17,7 +17,7 @@ module EnvironmentHelper
def
deployment_link
(
deployment
)
return
unless
deployment
link_to
"#
#{
deployment
.
id
}
"
,
[
deployment
.
project
.
namespace
.
becomes
(
Namespace
),
deployment
.
project
,
deployment
.
deployable
]
link_to
"#
#{
deployment
.
i
i
d
}
"
,
[
deployment
.
project
.
namespace
.
becomes
(
Namespace
),
deployment
.
project
,
deployment
.
deployable
]
end
def
last_deployment_link_for_environment_build
(
project
,
build
)
...
...
app/views/projects/builds/show.html.haml
View file @
9ed7171a
...
...
@@ -43,7 +43,7 @@
-
if
environment
.
last_deployment
View the most recent deployment
#{
deployment_link
(
environment
.
last_deployment
)
}
.
-
elsif
@build
.
complete?
&&
!
@build
.
success?
The deployment of this build to
#{
environment_link_for_build
(
@build
.
project
,
@build
)
}
did not
complete
.
The deployment of this build to
#{
environment_link_for_build
(
@build
.
project
,
@build
)
}
did not
succeed
.
-
else
This build is creating a deployment to
#{
environment_link_for_build
(
@build
.
project
,
@build
)
}
-
if
environment
.
last_deployment
...
...
spec/views/projects/builds/show.html.haml_spec.rb
View file @
9ed7171a
...
...
@@ -40,6 +40,10 @@ describe 'projects/builds/show', :view do
create
(
:ci_build
,
:success
,
environment:
'staging'
,
pipeline:
pipeline
)
end
let
(
:second_build
)
do
create
(
:ci_build
,
:success
,
environment:
'staging'
,
pipeline:
pipeline
)
end
let
(
:environment
)
do
create
(
:environment
,
name:
'staging'
,
project:
project
)
end
...
...
@@ -49,12 +53,12 @@ describe 'projects/builds/show', :view do
end
let!
(
:second_deployment
)
do
create
(
:deployment
,
environment:
environment
,
deployable:
build
)
create
(
:deployment
,
environment:
environment
,
deployable:
second_
build
)
end
it
'shows deployment message'
do
expected_text
=
'This build is an out-of-date deployment '
\
"to staging.
\n
View the most recent deployment #
#{
second_deployment
.
id
}
."
"to staging.
\n
View the most recent deployment #
#{
second_deployment
.
i
i
d
}
."
render
expect
(
rendered
).
to
have_css
(
'.environment-information'
,
text:
expected_text
)
...
...
@@ -71,7 +75,7 @@ describe 'projects/builds/show', :view do
end
it
'shows deployment message'
do
expected_text
=
'The deployment of this build to staging did not
complete
.'
expected_text
=
'The deployment of this build to staging did not
succeed
.'
render
expect
(
rendered
).
to
have_css
(
...
...
@@ -107,7 +111,7 @@ describe 'projects/builds/show', :view do
end
it
'shows deployment message'
do
expected_text
=
'The deployment of this build to staging did not
complete
'
expected_text
=
'The deployment of this build to staging did not
succeed
'
render
expect
(
rendered
).
to
have_css
(
...
...
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