Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic NotificationMailerPreview #8309

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions spec/mailers/previews/notification_mailer_preview.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class NotificationMailerPreview < ActionMailer::Preview
def daily_summary
NotificationMailer.daily_summary(user, notifications)
end

private

def user
User.new(
name: 'Pro user',
email: 'pro@localhost'
)
end

# 902: useless_incoming_message_event
def notifications
[
Notification.new(user: user, info_request_event: InfoRequestEvent.find(902))

Check warning on line 18 in spec/mailers/previews/notification_mailer_preview.rb

View workflow job for this annotation

GitHub Actions / build

[rubocop] reported by reviewdog 🐶 Line is too long. [82/80] (https://rubystyle.guide#max-line-length) Raw Output: spec/mailers/previews/notification_mailer_preview.rb:18:81: C: Layout/LineLength: Line is too long. [82/80] (https://rubystyle.guide#max-line-length)
]
end
end
Loading