DEV: Use proper wording for contexts in specs

This commit is contained in:
Loïc Guitaut
2022-07-27 18:14:14 +02:00
committed by Loïc Guitaut
parent 02987e05d5
commit 3eaac56797
337 changed files with 2172 additions and 2723 deletions

View File

@ -6,8 +6,7 @@ RSpec.describe WebhooksController do
let(:email) { "em@il.com" }
let(:message_id) { "12345@il.com" }
context "mailgun" do
describe "#mailgun" do
let(:token) { "705a8ccd2ce932be8e98c221fe701c1b4a0afcb8bbd57726de" }
let(:timestamp) { Time.now.to_i }
let(:data) { "#{timestamp}#{token}" }
@ -81,7 +80,7 @@ RSpec.describe WebhooksController do
end
end
context "sendgrid" do
describe "#sendgrid" do
it "works" do
user = Fabricate(:user, email: email)
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
@ -106,7 +105,7 @@ RSpec.describe WebhooksController do
end
end
context "mailjet" do
describe "#mailjet" do
it "works" do
user = Fabricate(:user, email: email)
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
@ -127,7 +126,7 @@ RSpec.describe WebhooksController do
end
end
context "mandrill" do
describe "#mandrill" do
it "works" do
user = Fabricate(:user, email: email)
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
@ -155,7 +154,7 @@ RSpec.describe WebhooksController do
end
end
context "mandrill_head" do
describe "#mandrill_head" do
it "works" do
head "/webhooks/mandrill.json"
@ -163,7 +162,7 @@ RSpec.describe WebhooksController do
end
end
context "postmark" do
describe "#postmark" do
it "works" do
user = Fabricate(:user, email: email)
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)
@ -198,7 +197,7 @@ RSpec.describe WebhooksController do
end
end
context "sparkpost" do
describe "#sparkpost" do
it "works" do
user = Fabricate(:user, email: email)
email_log = Fabricate(:email_log, user: user, message_id: message_id, to_address: email)