Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/api/v1/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def render_record_invalid(exception)
end

def render_parameter_missing(exception)
render_error(exception, { message: I18n.t('api.errors.missing_param') }, :unprocessable_entity)
render_error(exception, { message: I18n.t('api.errors.missing_param') }, :unprocessable_content)
end

def render_error(exception, errors, status)
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/api/v1/passwords/update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
it 'does not change the password if confirmation does not match' do
params[:password_confirmation] = 'anotherpass'
put user_password_path, params:, headers:, as: :json
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
end
end
end
6 changes: 3 additions & 3 deletions spec/requests/api/v1/users/create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

it 'does not return a successful response' do
subject
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
end
end

Expand All @@ -69,7 +69,7 @@

it 'does not return a successful response' do
subject
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
end
end

Expand All @@ -87,7 +87,7 @@

it 'does not return a successful response' do
subject
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
end
end
end