rundfunk-mitbestimmen
rundfunk-mitbestimmen copied to clipboard
[WIP]849 send notification when broadcast is created
Description
Fixes #849
Motivation and Context
It would be nice to send an email/slack notification informing that a new broadcast has been created.
How Has This Been Tested?
You will need to login to the site and create a broadcast, an easy way of doing so is as follows:
- Go to this link and search for a broadcast that does not exist.
- You'll be redirected to a page where you can create a broadcast. When you fill in the details and hit the create button you will be able to trigger the email.
- Open mailer should send you to a link with the email details.
- If you're not redirected, relax you can still view the emails on this link. This will show you all the emails that you have attempted sending.
Screenshots (if appropriate):
When you have successfully created a broadcast
Just before you save the broadcast
Checklist:
- [x] My code follows the code style of this project.
- [x] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
@faithngetich I updated your PR quite a bit and I hope I paved the way for you with some tests. I replaced letter_opener
with mailhog
which is the cleaner alternative, as it does not require a change to our rails code. Also, I configured sidekiq
to process our mailers.
Hello @roschaefer, what can I do to help finish this PR?
@ciremoussadia sorry for responding so late. I kept the Github notification "unread" to motivate me to dig into this PR but I failed.
So, to answer your question: The build server tells me that push
has succeeded but pr
has not. This could mean that branch master
was updated and has not been merged into this PR.
-
git checkout 849_send_notification_when_broadcast_is_created
-
git fetch
-
git merge origin/master
-
git push origin -u 849_send_notification_when_broadcast_is_created
Will update this PR. The expected outcome is that both pr
and push
fail. The build server tells me that there are rubocop errors (easy) and some rspec failures. You could fix the rubocops with bundle exec rubocop -a
. As a next step you would need to fix the rspec tests. I think once this is done we could merge the PR.