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
Léo-Paul Géneau
gitlab-ce
Commits
7e72fcaa
Commit
7e72fcaa
authored
Nov 24, 2017
by
Filipa Lacerda
Committed by
Tim Zallmann
Nov 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent 500 error when inspecting job after trigger was removed
parent
60784251
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
app/views/projects/jobs/_sidebar.html.haml
app/views/projects/jobs/_sidebar.html.haml
+4
-3
changelogs/unreleased/36400-trigger-job.yml
changelogs/unreleased/36400-trigger-job.yml
+5
-0
spec/views/projects/jobs/show.html.haml_spec.rb
spec/views/projects/jobs/show.html.haml_spec.rb
+25
-0
No files found.
app/views/projects/jobs/_sidebar.html.haml
View file @
7e72fcaa
...
...
@@ -44,6 +44,7 @@
%h4
.title
Trigger
-
if
@build
.
trigger_request
&
.
trigger
&
.
short_token
%p
%span
.build-light-text
Token:
#{
@build
.
trigger_request
.
trigger
.
short_token
}
...
...
changelogs/unreleased/36400-trigger-job.yml
0 → 100644
View file @
7e72fcaa
---
title
:
Prevent 500 error when inspecting job after trigger was removed
merge_request
:
author
:
type
:
fixed
spec/views/projects/jobs/show.html.haml_spec.rb
View file @
7e72fcaa
...
...
@@ -185,6 +185,31 @@ describe 'projects/jobs/show' do
end
end
context
'when incomplete trigger_request is used'
do
before
do
build
.
trigger_request
=
FactoryGirl
.
build
(
:ci_trigger_request
,
trigger:
nil
)
end
it
'test should not render token block'
do
render
expect
(
rendered
).
not_to
have_content
(
'Token'
)
end
end
context
'when complete trigger_request is used'
do
before
do
build
.
trigger_request
=
FactoryGirl
.
build
(
:ci_trigger_request
)
end
it
'should render token'
do
render
expect
(
rendered
).
to
have_content
(
'Token'
)
expect
(
rendered
).
to
have_content
(
build
.
trigger_request
.
trigger
.
short_token
)
end
end
describe
'commit title in sidebar'
do
let
(
:commit_title
)
{
project
.
commit
.
title
}
...
...
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