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
3 changes: 1 addition & 2 deletions app/forms/idv/inherited_proofing/base_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def submit
FormResponse.new(
success: valid?,
errors: errors,
extra: {
},
extra: {},
)
end

Expand Down
15 changes: 10 additions & 5 deletions app/services/idv/inherited_proofing/va/mocks/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,22 @@ class Service
},
}.freeze

ERROR_HASH = {
errors: 'InheritedProofing::Errors::MHVIdentityDataNotFoundError',
}.freeze

def initialize(service_provider_data)
@auth_code = service_provider_data[:auth_code]
end

def execute
if (@auth_code != VALID_AUTH_CODE)
raise TypeError,
"auth_code is invalid: #{@auth_code}"
end
invalid_auth_code ? ERROR_HASH : PAYLOAD_HASH
end

private

PAYLOAD_HASH
def invalid_auth_code
@auth_code != VALID_AUTH_CODE
end
end
end
Expand Down
3 changes: 1 addition & 2 deletions lib/session_encryptor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ def kms_encrypt_pii!(session)
# We use #reduce to build the nested empty hash if needed. If Hash#bury
# (https://bugs.ruby-lang.org/issues/11747) existed, we could use that instead.
def kms_encrypt_sensitive_paths!(session, sensitive_paths)
sensitive_data = {
}
sensitive_data = {}

sensitive_paths.each do |path|
all_but_last_key = path[0..-2]
Expand Down
3 changes: 1 addition & 2 deletions spec/controllers/users/mfa_selection_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@
context 'with no active MFA' do
it 'redirects to the index page with a flash error' do
patch :update, params: {
two_factor_options_form: {
},
two_factor_options_form: {},
}

expect(response).to redirect_to two_factor_options_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
let(:auth_code) { "invalid-#{described_class::VALID_AUTH_CODE}" }

it 'returns an error' do
expect { subject.execute }.to raise_error(/auth_code is invalid/)
expect(subject.execute).to eq(described_class::ERROR_HASH)
end
end
end
Expand Down