mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
DEV: Apply rubocop (#8926)
This commit is contained in:
parent
daaa0a657f
commit
6a7e82c44c
@ -69,7 +69,7 @@ class WebhooksController < ActionController::Base
|
|||||||
|
|
||||||
message_id = params["MessageID"]
|
message_id = params["MessageID"]
|
||||||
to_address = params["Email"]
|
to_address = params["Email"]
|
||||||
type = params["Type"]
|
type = params["Type"]
|
||||||
case type
|
case type
|
||||||
when "HardBounce", "SpamNotification", "SpamComplaint"
|
when "HardBounce", "SpamNotification", "SpamComplaint"
|
||||||
process_bounce(message_id, to_address, SiteSetting.hard_bounce_score)
|
process_bounce(message_id, to_address, SiteSetting.hard_bounce_score)
|
||||||
|
@ -144,10 +144,10 @@ describe WebhooksController do
|
|||||||
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
|
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
|
||||||
|
|
||||||
post "/webhooks/postmark.json", params: {
|
post "/webhooks/postmark.json", params: {
|
||||||
"Type"=> "HardBounce",
|
"Type" => "HardBounce",
|
||||||
"MessageID"=> message_id,
|
"MessageID" => message_id,
|
||||||
"Email"=> email
|
"Email" => email
|
||||||
}
|
}
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
|
|
||||||
email_log.reload
|
email_log.reload
|
||||||
@ -159,10 +159,10 @@ describe WebhooksController do
|
|||||||
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
|
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
|
||||||
|
|
||||||
post "/webhooks/postmark.json", params: {
|
post "/webhooks/postmark.json", params: {
|
||||||
"Type"=> "SoftBounce",
|
"Type" => "SoftBounce",
|
||||||
"MessageID"=> message_id,
|
"MessageID" => message_id,
|
||||||
"Email"=> email
|
"Email" => email
|
||||||
}
|
}
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
|
|
||||||
email_log.reload
|
email_log.reload
|
||||||
@ -171,7 +171,6 @@ describe WebhooksController do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
context "sparkpost" do
|
context "sparkpost" do
|
||||||
it "works" do
|
it "works" do
|
||||||
user = Fabricate(:user, email: email)
|
user = Fabricate(:user, email: email)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user