summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Maes <jaspermaes.jm@gmail.com>2018-06-13 17:35:39 +0200
committerJasper Maes <jaspermaes.jm@gmail.com>2018-06-13 17:45:26 +0200
commitb6996837ea992a98018caa0210f10ae6f3bcc9c0 (patch)
tree49d2e243a70073fb0ba2cc7b22913ea85847b250
parentc102f956d82cc389f3e1d13ad68564602e8ab78f (diff)
downloadgitlab-ce-b6996837ea992a98018caa0210f10ae6f3bcc9c0.tar.gz
Rails5 fix stack level too deep
-rw-r--r--changelogs/unreleased/rails5-fix-47804.yml5
-rw-r--r--spec/controllers/application_controller_spec.rb8
2 files changed, 9 insertions, 4 deletions
diff --git a/changelogs/unreleased/rails5-fix-47804.yml b/changelogs/unreleased/rails5-fix-47804.yml
new file mode 100644
index 00000000000..3332ed3bbaa
--- /dev/null
+++ b/changelogs/unreleased/rails5-fix-47804.yml
@@ -0,0 +1,5 @@
+---
+title: Rails5 fix stack level too deep
+merge_request: 19762
+author: Jasper Maes
+type: fixed
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 773bf25ed44..b35b220b440 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -502,7 +502,7 @@ describe ApplicationController do
context '422 errors' 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)
get :index
@@ -511,7 +511,7 @@ describe ApplicationController do
it 'logs a response with an array' do
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)
get :index
@@ -519,7 +519,7 @@ describe ApplicationController do
end
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)
get :index
@@ -527,7 +527,7 @@ describe ApplicationController do
end
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)
get :index