-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mobile - lighthouse claims request decision (#12896)
- Loading branch information
Showing
6 changed files
with
214 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
modules/mobile/spec/request/legacy_claims_decision_request_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
require_relative '../support/helpers/iam_session_helper' | ||
|
||
RSpec.describe 'claims decision request', type: :request do | ||
describe 'GET /v0/claim/:id/request-decision' do | ||
before do | ||
iam_sign_in | ||
FactoryBot.create(:evss_claim, id: 1, evss_id: 600_117_255, user_uuid: '3097e489-ad75-5746-ab1a-e0aabc1b426a') | ||
Flipper.disable(:mobile_lighthouse_claims) | ||
end | ||
|
||
it 'returns jid with 202 status' do | ||
post '/mobile/v0/claim/600117255/request-decision', headers: iam_headers | ||
expect(response).to have_http_status(:accepted) | ||
expect(response.parsed_body.dig('data', 'jobId')).to eq(EVSS::RequestDecision.jobs.first['jid']) | ||
end | ||
|
||
it 'returns 500 for non-existent record' do | ||
post '/mobile/v0/claim/3242233/request-decision', headers: iam_headers | ||
expect(response).to have_http_status(:internal_server_error) | ||
end | ||
end | ||
end |
82 changes: 82 additions & 0 deletions
82
spec/support/vcr_cassettes/mobile/lighthouse_claims/request_decision/200_response.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
78 changes: 78 additions & 0 deletions
78
spec/support/vcr_cassettes/mobile/lighthouse_claims/request_decision/404_response.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.