about summary refs log tree commit diff
path: root/spec/mailers/previews/admin_mailer_preview.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-02-25 00:34:14 +0100
committerGitHub <noreply@github.com>2022-02-25 00:34:14 +0100
commit27965ce5edff20db2de1dd233c88f8393bb0da0b (patch)
tree6714a950c1b9facc8c7bd1907e81e777257e5538 /spec/mailers/previews/admin_mailer_preview.rb
parenta29a982eaa0536a741b43ffb3397c74e3abe7196 (diff)
Add trending statuses (#17431)
* Add trending statuses

* Fix dangling items with stale scores in localized sets

* Various fixes and improvements

- Change approve_all/reject_all to approve_accounts/reject_accounts
- Change Trends::Query methods to not mutate the original query
- Change Trends::Query#skip to offset
- Change follow recommendations to be refreshed in a transaction

* Add tests for trending statuses filtering behaviour

* Fix not applying filtering scope in controller
Diffstat (limited to 'spec/mailers/previews/admin_mailer_preview.rb')
-rw-r--r--spec/mailers/previews/admin_mailer_preview.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/mailers/previews/admin_mailer_preview.rb b/spec/mailers/previews/admin_mailer_preview.rb
index 9c0372b47..01436ba7a 100644
--- a/spec/mailers/previews/admin_mailer_preview.rb
+++ b/spec/mailers/previews/admin_mailer_preview.rb
@@ -6,14 +6,9 @@ class AdminMailerPreview < ActionMailer::Preview
     AdminMailer.new_pending_account(Account.first, User.pending.first)
   end
 
-  # Preview this email at http://localhost:3000/rails/mailers/admin_mailer/new_trending_tags
-  def new_trending_tags
-    AdminMailer.new_trending_tags(Account.first, Tag.limit(3))
-  end
-
-  # Preview this email at http://localhost:3000/rails/mailers/admin_mailer/new_trending_links
-  def new_trending_links
-    AdminMailer.new_trending_links(Account.first, PreviewCard.limit(3))
+  # Preview this email at http://localhost:3000/rails/mailers/admin_mailer/new_trends
+  def new_trends
+    AdminMailer.new_trends(Account.first, PreviewCard.limit(3), Tag.limit(3), Status.where(reblog_of_id: nil).limit(3))
   end
 
   # Preview this email at http://localhost:3000/rails/mailers/admin_mailer/new_appeal