From 934989f821a77f33228bcc331191c0e3a7a7e5bb Mon Sep 17 00:00:00 2001 From: Micah Frazier Date: Tue, 23 Apr 2024 17:17:04 -0600 Subject: [PATCH] More rubocop whining --- app/controllers/claims_base_controller.rb | 11 ++++++----- ...cation_career_counseling_claims_controller_spec.rb | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/controllers/claims_base_controller.rb b/app/controllers/claims_base_controller.rb index 708d721c864..5604e9b7dc0 100644 --- a/app/controllers/claims_base_controller.rb +++ b/app/controllers/claims_base_controller.rb @@ -44,11 +44,12 @@ def show end def service_history - if current_user.icn - history = service.get_service_history(current_user.icn) - else - # find the current user icn via querying an auth endpoint - end + history = if current_user.icn + service.get_service_history(current_user.icn) + else + # find the current user icn via querying an auth endpoint + { data: [] } + end render(json: history) end diff --git a/spec/controllers/v0/education_career_counseling_claims_controller_spec.rb b/spec/controllers/v0/education_career_counseling_claims_controller_spec.rb index 25ffd29df62..5bd4bf486e6 100644 --- a/spec/controllers/v0/education_career_counseling_claims_controller_spec.rb +++ b/spec/controllers/v0/education_career_counseling_claims_controller_spec.rb @@ -63,7 +63,7 @@ end context 'logged in user with icn' do - let(:icn) { '123498767V234859'} + let(:icn) { '123498767V234859' } it 'returns the service history' do VCR.use_cassette('lighthouse/veteran_verification/service_history/200_response') do