Skip to content

Rework notifications, check each one, and fix cta links

Anthony Shull requested to merge as/bug/828/cta-links into develop

I rewrote a lot of notifications. Cleaned up a ton of redundant code as well as confusing uses of variables. I also added subject and cta_link as fields on the notification. They get created before save so that they can just be read out when the notification is actually sent.

To test you'll need to run maildev, redis, and sidekiq. There are too many emails to test each manually here. But, we'll highlight some.

%> bundle exec db:reset
%> bundle exec rails c

You will see multiple emails have already been sent:

  1. New user confirmation
  2. Project has applied to challenge
  3. Pending affiliation from project to space
  4. New need in a project

Test that affiliation emails are sent:

> Space.first.remove_affiliate(Project.first)

You should see a removed affiliation email.

Test that a pending member email is sent:

> Space.first.notif_pending_member(User.first)
Edited by Anthony Shull

Merge request reports