Skip to content

Commit

Permalink
fix claim docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aherzberg committed Oct 24, 2024
1 parent d5f5b21 commit 060ff9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ def claim_data
file_type: 'Civilian Police Reports',
document_type: nil,
filename: '7B434B58-477C-4379-816F-05E6D3A10487.pdf',
upload_date: '2023-03-01' }],
upload_date: '2023-03-01',
document_id: "{883B6CC8-D726-4911-9C65-2EB360E12F52}" }],

Check failure on line 72 in modules/mobile/spec/models/adapters/lighthouse_individual_claims_adapter_spec.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
upload_date: '2023-03-01',
date: Date.new(2023, 3, 1),
file_type: nil,
document_type: nil,
filename: nil })
filename: nil,
document_id: nil })
end

context 'with claim in phase CLAIM_RECEIVED' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,16 @@
tracked_item_with_docs = response.parsed_body.dig('data', 'attributes', 'eventsTimeline').select do |event|
event['trackedItemId'] == 360_052
end.first
untracked_document = response.parsed_body.dig('data', 'attributes', 'eventsTimeline').select do |event|
event['type'] == 'other_documents_list'
end.first

expect(response).to have_http_status(:ok)
expect(response.body).to match_json_schema('individual_claim', strict: true)

expect(tracked_item_with_docs['documents'].count).to eq(1)
expect(tracked_item_with_docs['uploaded']).to eq(true)
expect(tracked_item_with_docs.dig('documents', 0, 'documentId')).to eq('{883B6CC8-D726-4911-9C65-2EB360E12F52}')

expect(tracked_item_with_no_docs['documents'].count).to eq(0)
expect(tracked_item_with_no_docs['uploaded']).to eq(false)

expect(untracked_document['documentId']).to eq('{6A6DFA79-4EC9-4E58-9653-25BDCFB06A03}')

Check failure on line 45 in modules/mobile/spec/requests/mobile/v0/lighthouse_claim_spec.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/EmptyLines: Extra blank line detected.
uploaded_of_events = response.parsed_body.dig('data', 'attributes', 'eventsTimeline').pluck('uploaded').compact
date_of_events = response.parsed_body.dig('data', 'attributes', 'eventsTimeline').pluck('date')
Expand Down

0 comments on commit 060ff9c

Please sign in to comment.