Skip to content

Commit

Permalink
update tests and response example
Browse files Browse the repository at this point in the history
  • Loading branch information
tycol7 committed Dec 18, 2024
1 parent 7410fe9 commit 64f54bd
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
index_request_with(poa_codes:, auth_header:)

expect(response).to have_http_status(:ok)
expect(JSON.parse(response.body).size).to eq(3)
expect(JSON.parse(response.body)['data'].size).to eq(3)
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'rails_helper'
require Rails.root / 'modules/claims_api/spec/rails_helper'

RSpec.describe 'ClaimsApi::V2::PowerOfAttorneyRequests#index', :bgs, type: :request do
RSpec.describe 'ClaimsApi::V2::PowerOfAttorneyRequests#index', :bgs, skip: 'unused', type: :request do
subject { perform_request(params) }

def perform_request(params)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,121 +1,104 @@
{
"type": "array",
"items": {
"type": "object",
"properties": {
"VSOUserEmail": {
"type": [
"string",
"null"
]
},
"VSOUserFirstName": {
"type": [
"string",
"null"
]
},
"VSOUserLastName": {
"type": [
"string",
"null"
]
},
"changeAddressAuth": {
"type": [
"string",
"null"
]
},
"claimantCity": {
"type": [
"string",
"null"
]
},
"claimantCountry": {
"type": [
"string",
"null"
]
},
"claimantMilitaryPO": {
"type": [
"string",
"null"
]
},
"claimantMilitaryPostalCode": {
"type": [
"string",
"null"
]
},
"claimantState": {
"type": [
"string",
"null"
]
},
"claimantZip": {
"type": [
"string",
"null"
]
},
"dateRequestActioned": {
"type": "string"
},
"dateRequestReceived": {
"type": "string"
},
"declinedReason": {
"type": [
"string",
"null"
]
},
"healthInfoAuth": {
"type": [
"string",
"null"
]
},
"poaCode": {
"type": [
"string",
"null"
]
},
"procID": {
"type": "string"
},
"secondaryStatus": {
"type": "string"
},
"vetFirstName": {
"type": [
"string",
"null"
]
},
"vetLastName": {
"type": [
"string",
"null"
]
},
"vetMiddleName": {
"type": [
"string",
"null"
]
},
"vetPtcpntID": {
"type": [
"string",
"null"
]
"type": "object",
"required": ["data"],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"required": ["type", "attributes"],
"properties": {
"id": {
"type": ["string", "null"],
"format": "uuid"
},
"type": {
"type": "string",
"enum": ["power-of-attorney-request"]
},
"attributes": {
"type": "object",
"required": ["veteran", "claimant", "representative"],
"properties": {
"veteran": {
"type": "object",
"properties": {
"firstName": {
"type": ["string", "null"]
},
"lastName": {
"type": ["string", "null"]
},
"middleName": {
"type": ["string", "null"]
}
}
},
"claimant": {
"type": "object",
"properties": {
"city": {
"type": ["string", "null"]
},
"country": {
"type": ["string", "null"]
},
"militaryPo": {
"type": ["string", "null"]
},
"militaryPostalCode": {
"type": ["string", "null"]
},
"state": {
"type": ["string", "null"]
},
"zip": {
"type": ["string", "null"]
}
}
},
"representative": {
"type": "object",
"properties": {
"poaCode": {
"type": ["string", "null"]
},
"vsoUserEmail": {
"type": ["string", "null"]
},
"vsoUserFirstName": {
"type": ["string", "null"]
},
"vsoUserLastName": {
"type": ["string", "null"]
}
}
},
"receivedDate": {
"type": ["string", "null"],
"format": "date-time"
},
"decisionDate": {
"type": ["string", "null"],
"format": "date-time"
},
"status": {
"type": ["string", "null"]
},
"declinedReason": {
"type": ["string", "null"]
},
"changeAddressAuthorization": {
"type": ["string", "null"],
"enum": ["Y", "N", null]
},
"healthInfoAuthorization": {
"type": ["string", "null"],
"enum": ["Y", "N", null]
}
}
}
}
}
}
}
Expand Down

0 comments on commit 64f54bd

Please sign in to comment.