about summary refs log tree commit diff
path: root/spec/mailers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-02-19 10:42:55 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-02-19 10:42:55 +0100
commit7452a959989f1259b68d08814437bab53ee89bb0 (patch)
tree389c2be7b7a326729e4687019a58950a07bd2dde /spec/mailers
parent4c68189d2b8b6a9a74fc13862b11bf6c6d523409 (diff)
parentfef6c59b3abe349132dbe910b6aa243e59b732bb (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.github/dependabot.yml`:
  Upstream made changes while we have dropped this file.
  Keep the file deleted.
- `.prettierignore`:
  Upstream made changes at the end of the file, where we
  had our extra lines.
  Just moved our extra lines back at the end.
- `app/serializers/initial_state_serializer.rb`:
  Upstream code style changes.
  Applied them.
- `app/services/backup_service.rb`:
  Upstream code style changes.
  Applied them.
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notification_mailer_spec.rb44
-rw-r--r--spec/mailers/user_mailer_spec.rb2
2 files changed, 23 insertions, 23 deletions
diff --git a/spec/mailers/notification_mailer_spec.rb b/spec/mailers/notification_mailer_spec.rb
index 29bdc349b..6746871a3 100644
--- a/spec/mailers/notification_mailer_spec.rb
+++ b/spec/mailers/notification_mailer_spec.rb
@@ -1,4 +1,4 @@
-require "rails_helper"
+require 'rails_helper'
 
 RSpec.describe NotificationMailer, type: :mailer do
   let(:receiver)       { Fabricate(:user) }
@@ -19,69 +19,69 @@ RSpec.describe NotificationMailer, type: :mailer do
     end
   end
 
-  describe "mention" do
+  describe 'mention' do
     let(:mention) { Mention.create!(account: receiver.account, status: foreign_status) }
     let(:mail) { NotificationMailer.mention(receiver.account, Notification.create!(account: receiver.account, activity: mention)) }
 
     include_examples 'localized subject', 'notification_mailer.mention.subject', name: 'bob'
 
-    it "renders the headers" do
-      expect(mail.subject).to eq("You were mentioned by bob")
+    it 'renders the headers' do
+      expect(mail.subject).to eq('You were mentioned by bob')
       expect(mail.to).to eq([receiver.email])
     end
 
-    it "renders the body" do
-      expect(mail.body.encoded).to match("You were mentioned by bob")
+    it 'renders the body' do
+      expect(mail.body.encoded).to match('You were mentioned by bob')
       expect(mail.body.encoded).to include 'The body of the foreign status'
     end
   end
 
-  describe "follow" do
+  describe 'follow' do
     let(:follow) { sender.follow!(receiver.account) }
     let(:mail) { NotificationMailer.follow(receiver.account, Notification.create!(account: receiver.account, activity: follow)) }
 
     include_examples 'localized subject', 'notification_mailer.follow.subject', name: 'bob'
 
-    it "renders the headers" do
-      expect(mail.subject).to eq("bob is now following you")
+    it 'renders the headers' do
+      expect(mail.subject).to eq('bob is now following you')
       expect(mail.to).to eq([receiver.email])
     end
 
-    it "renders the body" do
-      expect(mail.body.encoded).to match("bob is now following you")
+    it 'renders the body' do
+      expect(mail.body.encoded).to match('bob is now following you')
     end
   end
 
-  describe "favourite" do
+  describe 'favourite' do
     let(:favourite) { Favourite.create!(account: sender, status: own_status) }
     let(:mail) { NotificationMailer.favourite(own_status.account, Notification.create!(account: receiver.account, activity: favourite)) }
 
     include_examples 'localized subject', 'notification_mailer.favourite.subject', name: 'bob'
 
-    it "renders the headers" do
-      expect(mail.subject).to eq("bob favourited your post")
+    it 'renders the headers' do
+      expect(mail.subject).to eq('bob favourited your post')
       expect(mail.to).to eq([receiver.email])
     end
 
-    it "renders the body" do
-      expect(mail.body.encoded).to match("Your post was favourited by bob")
+    it 'renders the body' do
+      expect(mail.body.encoded).to match('Your post was favourited by bob')
       expect(mail.body.encoded).to include 'The body of the own status'
     end
   end
 
-  describe "reblog" do
+  describe 'reblog' do
     let(:reblog) { Status.create!(account: sender, reblog: own_status) }
     let(:mail) { NotificationMailer.reblog(own_status.account, Notification.create!(account: receiver.account, activity: reblog)) }
 
     include_examples 'localized subject', 'notification_mailer.reblog.subject', name: 'bob'
 
-    it "renders the headers" do
-      expect(mail.subject).to eq("bob boosted your post")
+    it 'renders the headers' do
+      expect(mail.subject).to eq('bob boosted your post')
       expect(mail.to).to eq([receiver.email])
     end
 
-    it "renders the body" do
-      expect(mail.body.encoded).to match("Your post was boosted by bob")
+    it 'renders the body' do
+      expect(mail.body.encoded).to match('Your post was boosted by bob')
       expect(mail.body.encoded).to include 'The body of the own status'
     end
   end
@@ -98,7 +98,7 @@ RSpec.describe NotificationMailer, type: :mailer do
     end
 
     it 'renders the body' do
-      expect(mail.body.encoded).to match("bob has requested to follow you")
+      expect(mail.body.encoded).to match('bob has requested to follow you')
     end
   end
 end
diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb
index 2ed33c1e4..9c22f60f1 100644
--- a/spec/mailers/user_mailer_spec.rb
+++ b/spec/mailers/user_mailer_spec.rb
@@ -90,7 +90,7 @@ describe UserMailer, type: :mailer do
 
     it 'renders warning notification' do
       receiver.update!(locale: nil)
-      expect(mail.body.encoded).to include I18n.t("user_mailer.warning.title.suspend", acct: receiver.account.acct)
+      expect(mail.body.encoded).to include I18n.t('user_mailer.warning.title.suspend', acct: receiver.account.acct)
       expect(mail.body.encoded).to include strike.text
     end
   end