summaryrefslogtreecommitdiff
path: root/spec/services/notification_service_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix unexpected extra notification mailsPatrick Derichs2019-04-171-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using custom_action and recipient filtering Add more generic filtering to user_ids_notifiable_on Add changelog entry Remove commented class Method is no longer needed Overloading no longer required Filter by action just in case of custom notification level Add participant check Fix unexpected extra notification mails Using custom_action and recipient filtering Add more generic filtering to user_ids_notifiable_on Add changelog entry Remove commented class Method is no longer needed Overloading no longer required Filter by action just in case of custom notification level Fix comment Add repond_to? checks Reverted custom_action filtering Enhanced output of should_email helper Changed :watch to :participating for custom notifiable users Change spec variable name Enhanced participating check These conditions are no longer needed Fix custom notification handling for participating type Participating level should include maintainers Fixed add_guest notification Fix successful pipeline notification Refactoring: Use maintainer? method on team instead Add spec for new_issue: true for a custom group setting which should have lower prio than an available project setting Clean up specs
* Add frozen_string_literal to spec/servicesfrozen_string_literal_spec_servicesThong Kuah2019-04-121-0/+2
| | | | Probably useful as we often move these files to "new" files.
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-091-0/+41
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-27/+28
| | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"Andreas Brandl2019-04-051-41/+0
| | | This reverts merge request !26823
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-051-0/+41
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Fix misspellings in app/spec executable linesTakuya Noguchi2019-02-271-1/+1
| | | | Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Sent notification only to authorized usersJan Provaznik2019-01-311-6/+23
| | | | | | | | | | | When moving a project, it's possible that some users who had access to the project in old path can not access the project in the new path. Because `project_authorizations` records are updated asynchronously, when we send the notification about moved project the list of project team members contains old project members, we want to notify all these members except the old users who can not access the new location.
* Rename GroupHierarchy into ObjectHierarchyJarka Košanová2018-12-191-4/+4
| | | | | | - we now use the hierarchy class also for epics - also rename supports_nested_groups? into supports_nested_objects? - move it to a concern
* Send a notification email on mirror update errorsAlejandro Rodríguez2018-12-111-0/+33
| | | | | | The email is sent to project maintainers containing the last mirror update error. This will allow maintainers to set alarms and react accordingly.
* Use BFG object maps to clean projectsNick Thomas2018-12-061-0/+21
|
* Add email for milestone changeChantal Rollison2018-11-021-0/+160
|
* Automatically disable Auto DevOps for project upon first pipeline failureMayra Cabrera2018-09-061-0/+17
|
* Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-111-53/+53
|
* Updates from `rubocop -a`Lin Jen-Shin2018-07-091-1/+1
|
* Apply notification settings level of groups to all child objectsFelipe Artur2018-06-071-29/+159
|
* Notify with email when merge request became unmergeablelulalala2018-05-171-0/+26
| | | | Display MR unmergeable reasons
* Backport 5480-epic-notifications from EEMario de la Ossa2018-05-071-30/+1
|
* Move NotificationService calls to SidekiqSean McGivern2018-04-251-3/+39
| | | | | | | | | | | | | | | | | | | | | The NotificationService has to do quite a lot of work to calculate the recipients for an email. Where possible, we should try to avoid doing this in an HTTP request, because the mail are sent by Sidekiq anyway, so there's no need to schedule those emails immediately. This commit creates a generic Sidekiq worker that uses Global ID to serialise and deserialise its arguments, then forwards them to the NotificationService. The NotificationService gains an `#async` method, so you can replace: notification_service.new_issue(issue, current_user) With: notification_service.async.new_issue(issue, current_user) And have everything else work as normal, except that calculating the recipients will be done by Sidekiq, which will then schedule further Sidekiq jobs to send each email.
* Make issue due email more consistent with other mailersSean McGivern2018-04-171-0/+2
|
* Only send issue due emails to participants and custom subscribersSean McGivern2018-03-301-3/+10
|
* Merge branch 'master' into stuartnelson3/gitlab-ce-stn/issue-due-emailSean McGivern2018-03-301-0/+30
|\
| * Send notification emails when push to a merge requestYarNayar/gitlab-ce-23460-send-email-when-pushing-more-commits-to-the-merge-requestYarNayar2018-03-261-0/+30
| | | | | | | | Closes #23460
* | Send issue due emails to all participantsSean McGivern2018-03-301-0/+31
|/
* Always notify new mentions even if explicitly unsubscribed43933-always-notify-mentionsMario de la Ossa2018-03-191-3/+18
|
* Add DNS verification to Pages custom domainsNick Thomas2018-02-231-0/+72
|
* Resolve "group request membership mail with too long list of "To:""🙈 jacopo beschi 🙉2018-02-191-20/+69
|
* Make user/author use project.creator in most factoriesRémy Coutable2018-01-311-2/+4
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Initial work to add notification reason to emailsMario de la Ossa2018-01-161-1/+61
| | | | | | | | | | | Adds `#build_notification_recipients` to `NotificationRecipientService` that returns the `NotificationRecipient` objects in order to be able to access the new attribute `reason`. This new attribute is used in the different notifier methods in order to add the reason as a header: `X-GitLab-NotificationReason`. Only the reason with the most priority gets sent.
* Fix watch level for mentions in descriptionSean McGivern2017-12-041-5/+23
| | | | | | | | | | | | | | | For a user with the mention notification level set, the type of their corresponding NotificationRecipient must be :mention for them to receive an email. We set this correctly on notes, but we weren't adding it on new issues or MRs - perhaps because these users are also participants. But the type of the NotificationRecipient in that case would be :participant, not mention, so we have to add the mentioned users manually when creating an issue or MR. When editing an issue or MR, and there are newly-mentioned users to email, we still use the :new_issue and :new_merge_request actions, so this works for that case as well.
* Adds Rubocop rule for line break after guard clauseJacopo2017-11-161-0/+2
| | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* Merge branch '37691-subscription-fires-multiple-notifications' into 'master'Sean McGivern2017-10-121-0/+12
|\ | | | | | | | | | | | | fix multiple notifications from being sent for multiple labels Closes #37691 See merge request gitlab-org/gitlab-ce!14798
| * fix multiple notifications from being sent for multiple labelsmicael.bergeron2017-10-101-0/+12
| | | | | | | | | | This also refactor the email_helper support spec to watch for multiple emails being sent.
* | Send a confirmation email when the user adds a secondary email address. ↵Brett Walker2017-09-231-12/+0
|/ | | | Utilizes the Devise `confirmable` capabilities. Issue #37385
* created services for keyshaseeb2017-09-151-1/+0
|
* Removes default scope from sortable23079-remove-default-scope-in-sortableTiago Botelho2017-09-071-2/+2
|
* rm a comment that is a liehttp://jneen.net/2017-08-211-1/+0
|
* add a spec for a participant with a :custom settinghttp://jneen.net/2017-08-211-2/+14
| | | | where that custom setting is not enabled.
* switch to multi-line before blockhttp://jneen.net/2017-08-111-1/+3
|
* restructure the #new_key notification spechttp://jneen.net/2017-08-111-11/+6
|
* reset_delivered_emails before testing #new_keyhttp://jneen.net/2017-08-111-0/+1
| | | | since the mere act of creating the key sends an email :|
* move the member spec to be with the other oneshttp://jneen.net/2017-08-111-30/+52
| | | | and add one
* add a spec for new_group_memberhttp://jneen.net/2017-08-111-0/+30
|
* add a spec for never emailing the ghost userhttp://jneen.net/2017-08-111-0/+8
|
* check notifiability for more emailshttp://jneen.net/2017-08-111-8/+28
|
* Enable the RSpec/HookArgument cop and auto-correct offensesRobert Speicher2017-08-101-3/+3
|
* Enable the Layout/SpaceBeforeBlockBraces coprc/enable-the-Layout/SpaceBeforeBlockBraces-copRémy Coutable2017-08-091-3/+3
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'refactor.notification-recipient-builders' into 'master'Sean McGivern2017-08-041-0/+5
|\ | | | | | | | | Refactor.notification recipient builders See merge request !13197
| * add builder helpers with levels and start to separate out #filter!http://jneen.net/2017-08-031-0/+5
| |
* | Don't include EmailHelpers manually, pick with rspecuse-rspec-support-helperLin Jen-Shin2017-08-031-7/+4
|/ | | | | | | | | `:mailer` is needed to pick it easily, while `type: :mailer` is needed for picking it automatically for tests located in spec/mailers/*_spec.rb It's a bit complicated in spec/services/notification_service_spec.rb but we'll leave it alone for now.