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

Fix Violation of and Reenable Rails/ApplicationMailer #58264

Merged
merged 1 commit into from
May 7, 2024

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Apr 25, 2024

Checks that mailers subclass ApplicationMailer with Rails 5.0.

This is a pretty simple one; rather than inheriting from the base class to create our testing class, inherit from the actual class used by Dashboard, which in our case is just that base class plus some extra metrics.

Links

Testing story

The only thing updated here is a test file, so I'm entirely relying on tests to verify that this continues to work.

> Checks that mailers subclass `ApplicationMailer` with Rails 5.0.

This is a pretty simple one; rather than inheriting from the base class
to create our testing class, inherit from [the actual class used by
Dashboard](https://github.com/code-dot-org/code-dot-org/blob/staging/dashboard/app/mailers/application_mailer.rb),
which in our case is just that base class plus some extra metrics.

- https://www.rubydoc.info/gems/rubocop-rails/RuboCop/Cop/Rails/ApplicationMailer
- https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsapplicationmailer
@Hamms Hamms marked this pull request as ready for review April 25, 2024 23:24
@Hamms Hamms requested a review from a team April 25, 2024 23:25
@Hamms Hamms merged commit d281dc8 into staging May 7, 2024
2 checks passed
@Hamms Hamms deleted the fix-Rails/ApplicationMailer branch May 7, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants