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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b6996837
Commit
b6996837
authored
Jun 13, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5 fix stack level too deep
parent
c102f956
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
changelogs/unreleased/rails5-fix-47804.yml
changelogs/unreleased/rails5-fix-47804.yml
+5
-0
spec/controllers/application_controller_spec.rb
spec/controllers/application_controller_spec.rb
+4
-4
No files found.
changelogs/unreleased/rails5-fix-47804.yml
0 → 100644
View file @
b6996837
---
title
:
Rails5 fix stack level too deep
merge_request
:
19762
author
:
Jasper Maes
type
:
fixed
spec/controllers/application_controller_spec.rb
View file @
b6996837
...
@@ -502,7 +502,7 @@ describe ApplicationController do
...
@@ -502,7 +502,7 @@ describe ApplicationController do
context
'422 errors'
do
context
'422 errors'
do
it
'logs a response with a string'
do
it
'logs a response with a string'
do
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
'Hello world'
,
content_type:
'application/json'
)
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
'Hello world'
,
content_type:
'application/json'
,
cookies:
{}
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
get
:index
get
:index
...
@@ -511,7 +511,7 @@ describe ApplicationController do
...
@@ -511,7 +511,7 @@ describe ApplicationController do
it
'logs a response with an array'
do
it
'logs a response with an array'
do
body
=
[
'I want'
,
'my hat back'
]
body
=
[
'I want'
,
'my hat back'
]
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
body
,
content_type:
'application/json'
)
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
body
,
content_type:
'application/json'
,
cookies:
{}
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
get
:index
get
:index
...
@@ -519,7 +519,7 @@ describe ApplicationController do
...
@@ -519,7 +519,7 @@ describe ApplicationController do
end
end
it
'does not log a string with an empty body'
do
it
'does not log a string with an empty body'
do
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
nil
,
content_type:
'application/json'
)
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
nil
,
content_type:
'application/json'
,
cookies:
{}
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
get
:index
get
:index
...
@@ -527,7 +527,7 @@ describe ApplicationController do
...
@@ -527,7 +527,7 @@ describe ApplicationController do
end
end
it
'does not log an HTML body'
do
it
'does not log an HTML body'
do
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
'This is a test'
,
content_type:
'application/html'
)
response
=
spy
(
ActionDispatch
::
Response
,
status:
422
,
body:
'This is a test'
,
content_type:
'application/html'
,
cookies:
{}
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
allow
(
controller
).
to
receive
(
:response
).
and_return
(
response
)
get
:index
get
:index
...
...
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