render nothing: true has been removed from Rails
Use head instead
This commit is contained in:
parent
3fa9774123
commit
7ccae2c4f1
3 changed files with 4 additions and 4 deletions
|
@ -2,9 +2,9 @@ class PingController < ApplicationController
|
||||||
def index
|
def index
|
||||||
Rails.logger.silence do
|
Rails.logger.silence do
|
||||||
if (ActiveRecord::Base.connected?)
|
if (ActiveRecord::Base.connected?)
|
||||||
render nothing: true, status: 200, content_type: "application/json"
|
head :ok
|
||||||
else
|
else
|
||||||
render nothing: true, status: 500, content_type: "application/json"
|
head :internal_server_error
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
|
||||||
|
|
||||||
expect(controller).to receive(:send_data)
|
expect(controller).to receive(:send_data)
|
||||||
.with('pdf content', filename: 'attestation.pdf', type: 'application/pdf') do
|
.with('pdf content', filename: 'attestation.pdf', type: 'application/pdf') do
|
||||||
controller.render nothing: true
|
controller.head :ok
|
||||||
end
|
end
|
||||||
|
|
||||||
get :attestation, params: { procedure_id: procedure.id, dossier_id: dossier.id }
|
get :attestation, params: { procedure_id: procedure.id, dossier_id: dossier.id }
|
||||||
|
|
|
@ -56,7 +56,7 @@ describe NewUser::DossiersController, type: :controller do
|
||||||
|
|
||||||
expect(controller).to receive(:send_data)
|
expect(controller).to receive(:send_data)
|
||||||
.with('pdf content', filename: 'attestation.pdf', type: 'application/pdf') do
|
.with('pdf content', filename: 'attestation.pdf', type: 'application/pdf') do
|
||||||
controller.render nothing: true
|
controller.head :ok
|
||||||
end
|
end
|
||||||
|
|
||||||
get :attestation, params: { dossier_id: dossier.id }
|
get :attestation, params: { dossier_id: dossier.id }
|
||||||
|
|
Loading…
Add table
Reference in a new issue