create pseudonym registration done notification

fixes CNVS-31821

test plan
- run migrations
- ensure that pseudonym done notification is sent when creating
 a user as an admin via the api with these parameters:
user[skip_registration]=true
pseudonym[send_confirmation]=true
communication_channel[skip_confirmation]=false

Change-Id: Idd3a48afb8364ff49605e59080c324c459307444
Reviewed-on: https://gerrit.instructure.com/91617
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
This commit is contained in:
Joel Hough 2016-09-29 09:25:40 -06:00
parent 8ea297e838
commit 1f120c7031
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
class CreatePseudonymRegistrationDoneNotification < ActiveRecord::Migration
tag :predeploy
def self.up
return unless Shard.current == Shard.default
Canvas::MessageHelper.create_notification({
name: 'Pseudonym Registration Done',
delay_for: 0,
category: 'Registration'
})
end
def self.down
return unless Shard.current == Shard.default
Notification.where(name: 'Pseudonym Registration Done').delete_all
end
end