Skip to content

Commit

Permalink
renommage ReplyTransferEmailJob => HandleInboundEmailJob
Browse files Browse the repository at this point in the history
  • Loading branch information
adipasquale committed Dec 16, 2024
1 parent 9117621 commit 3f9a4e5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/inbound_emails_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class InboundEmailsController < ActionController::Base

def brevo
payload = request.params["items"].first
TransferEmailReplyJob.perform_later(payload)
HandleInboundEmailJob.perform_later(payload)
end

private
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cf /docs/interconnexions/brevo.md

class TransferEmailReplyJob < ApplicationJob
class HandleInboundEmailJob < ApplicationJob
queue_as :mailers

# Pour éviter de fuiter des données personnelles dans les logs
Expand Down
2 changes: 1 addition & 1 deletion app/mailers/users/file_attente_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def domain
end

def default_from
TransferEmailReplyJob.reply_address_for_rdv(@rdv)
HandleInboundEmailJob.reply_address_for_rdv(@rdv)
end
end
2 changes: 1 addition & 1 deletion app/mailers/users/rdv_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ def domain
end

def default_from
TransferEmailReplyJob.reply_address_for_rdv(@rdv)
HandleInboundEmailJob.reply_address_for_rdv(@rdv)
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RSpec.describe TransferEmailReplyJob do
RSpec.describe HandleInboundEmailJob do
describe "#uuid_from_email_address" do
%w[
[email protected]
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/inbound_email_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
it "enqueues the job that handles transferring the email" do
expect do
receive_brevo_callback
end.to have_enqueued_job(TransferEmailReplyJob).with({ "Subject" => "Dummy email" }).on_queue(:mailers)
end.to have_enqueued_job(HandleInboundEmailJob).with({ "Subject" => "Dummy email" }).on_queue(:mailers)
end
end

Expand Down

0 comments on commit 3f9a4e5

Please sign in to comment.