Conversation
solipet
left a comment
There was a problem hiding this comment.
One spec question but otherwise looks great!
There was a problem hiding this comment.
This spec doesn't have any expectations, or am I missing something?
52b7ade to
f27c8c2
Compare
There was a problem hiding this comment.
this is a very long timeout! especially for something that inline instead of backgrounded. would we consider making this a background job so that we can have the original webhook return faster?
|
can you rebase this to pick up fixes for the reviewapps cluster to be less sad? |
cd83ab7 to
5c227fb
Compare
solipet
left a comment
There was a problem hiding this comment.
A couple of small comments, but looks great overall!
There was a problem hiding this comment.
If we're not going to make this configurable or override it in specs, it could just be a var on line 47.
There was a problem hiding this comment.
| it 'does track state if state tracking is disabled' do | |
| it 'does track state if state tracking is enabled' do |
There was a problem hiding this comment.
If we move the expects inside it it it's more obvious what is actually being tested:
| endpoints.each do |endpoint| | |
| expect(SocureDocvRepeatWebhookJob).to receive(:perform_later) do |*args| | |
| expect(args.first[:body]).to eq(JSON.parse(repeated_body.to_json)) | |
| expect(args.first[:endpoint]).to eq(endpoint) | |
| expect(args.first[:headers]).to eq(headers) | |
| end | |
| end | |
| end | |
| context 'when idv workers are enabled' do | |
| it 'queues SocureDocvRepeatWebhook jobs' do | |
| post :create, params: webhook_body | |
| end | |
| end | |
| end | |
| context 'when idv workers are enabled' do | |
| it 'queues SocureDocvRepeatWebhook jobs' do | |
| endpoints.each do |endpoint| | |
| expect(SocureDocvRepeatWebhookJob).to receive(:perform_later) do |*args| | |
| expect(args.first[:body]).to eq(JSON.parse(repeated_body.to_json)) | |
| expect(args.first[:endpoint]).to eq(endpoint) | |
| expect(args.first[:headers]).to eq(headers) | |
| end | |
| end | |
| post :create, params: webhook_body | |
| end | |
| end |
changelog: Internal, Document Authentication, Repeat webhooks for docv
0e03eb1 to
e8949c5
Compare
🎫 Ticket
LG-15271
🛠 Summary of changes
Broadcast webhooks received from Socure to configure receivers.
📜 Testing Plan
Currently configured in the Timnit Sandbox
socure_docv_webhook_repeat_endpointsto receive repeated webhooks in Timnit config