-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API Particulier reporters: group emails instead of 1 email per group
Better this way, less spammy
- Loading branch information
Showing
6 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
17 changes: 10 additions & 7 deletions
17
app/interactors/datapass_webhook/api_particulier/notify_reporters.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Bonjour, | ||
|
||
Une nouvelle demande vient d'être validée pour l'ensemble de données associé au groupe '<%= params[:group] %>'. | ||
Une nouvelle demande vient d'être validée pour un ensemble de données associé au groupe auquel vous êtes bonné. | ||
|
||
Vous pouvez consulter la liste des demandes relatives aux données associé au groupe '<%= params[:group] %>' sur le lien suivant : <%= api_particulier_dashboard_reporter_url %> | ||
Vous pouvez consulter la liste des demandes relatives aux données associé aux groupes où vous êtes abonnés sur le lien suivant : <%= api_particulier_dashboard_reporter_url %> | ||
|
||
Cordialement, | ||
L'équipe API Particulier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Bonjour, | ||
|
||
Une nouvelle demande vient d'être déposée pour l'ensemble de données associé au groupe '<%= params[:group] %>'. | ||
Une nouvelle demande vient d'être déposée pour un ensemble de données associé à un groupe auquel vous êtes abonné. | ||
|
||
Vous pouvez consulter la liste des demandes relatives aux données associé au groupe '<%= params[:group] %>' sur le lien suivant : <%= api_particulier_dashboard_reporter_url %> | ||
Vous pouvez consulter la liste des demandes relatives aux données associé aux groupes où vous êtes abonnés sur le lien suivant : <%= api_particulier_dashboard_reporter_url %> | ||
|
||
Cordialement, | ||
L'équipe API Particulier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,13 @@ | |
|
||
describe '#submit' do | ||
subject(:mail) do | ||
described_class.with(group: 'cnaf').submit | ||
described_class.with(groups: %w[cnaf men]).submit | ||
end | ||
|
||
it 'sends an email to reporters associated to this group' do | ||
it 'sends an email to reporters associated to these groups' do | ||
expect(mail.bcc).to include('[email protected]') | ||
expect(mail.bcc).to include('[email protected]') | ||
expect(mail.bcc).not_to include('[email protected]') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters