Skip to content

Commit 80fa691

Browse files
committed
clean up
- adding a note to the inclusion of Current class - improving Current.request_id testing
1 parent efcdc45 commit 80fa691

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

app/models/current.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# see AP-513. We're bringing in Current here in order to attach the original request_id to a queued job
12
class Current < ActiveSupport::CurrentAttributes
23
attribute :request_id
34

spec/jobs/application_job_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def perform(*args); end
1616

1717
context 'when Current.request_id is set' do
1818
before do
19-
Current.request_id = request_id
19+
allow(Current).to receive(:request_id).and_return(request_id)
2020
end
2121

2222
it 'enqueues the job with the request_id' do

0 commit comments

Comments
 (0)