Skip to content

Commit

Permalink
max method length
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-mccurdy committed Jan 17, 2025
1 parent 5969eea commit acc078a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
24 changes: 13 additions & 11 deletions modules/vaos/app/controllers/vaos/v2/appointments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ def create_method_logging_name
end
end

# rubocop:disable Metrics/MethodLength
def submit_params
params.require(%i[id network_id provider_service_id slot_id referral_number])
params.permit(
Expand All @@ -360,22 +359,25 @@ def submit_params
:email,
:phone_number,
:gender,
address: [
:type,
{ line: [] },
:city,
:state,
:postal_code,
:country,
:text
],
address: submit_address_params,
name: [
:family,
{ given: [] }
]
)
end
# rubocop:enable Metrics/MethodLength

def submit_address_params
[
:type,
{ line: [] },
:city,
:state,
:postal_code,
:country,
:text
]
end

def patient_attributes(params)
{
Expand Down
1 change: 0 additions & 1 deletion modules/vaos/spec/requests/vaos/v2/appointments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,6 @@ def stub_clinics
match_requests_on: %i[method path]) do
VCR.use_cassette('vaos/v2/eps/post_submit_appointment_400',
match_requests_on: %i[method path]) do
params[:phone_number] = nil
post '/vaos/v2/appointments/submit', params: { ** params, phone_number: nil }, headers: inflection_header

response_obj = JSON.parse(response.body)
Expand Down

0 comments on commit acc078a

Please sign in to comment.