Fixes CNVS-22965
Test plan:
- Create a user and a communication channel for that user, or reuse
an existing one that has not been deleted
- Bounce details:
- From a console, do the following, where "..." is the id of the
communication channel you're working with:
c = CommunicationChannel.find(...)
c.last_bounce_details =
{'bouncedRecipients' => [{'diagnosticCode' => 'foo'}]}
c.save!
- As a siteadmin, hit /api/v1/users/.../communication_channels, where
... is the id of the user that owns the communication channel
- Verify that the communication channel includes a
"last_bounce_summary" property whose value is "foo"
- Transient bounce details:
- From a console, do the following, where "..." is the id of the
communication channel you're working with:
c = CommunicationChannel.find(...)
c.last_transient_bounce_details =
{'bouncedRecipients' => [{'diagnosticCode' => 'foo'}]}
c.save!
- As a siteadmin, hit /api/v1/users/.../communication_channels, where
... is the id of the user that owns the communication channel
- Verify that the communication channel includes a
"last_transient_bounce_summary" property whose value is "foo"
- Bounce date:
- From a console, do the following, where "..." is the id of the
communication channel you're working with:
c = CommunicationChannel.find(...)
c.last_bounce_at = '2015-01-01T01:01:01.000Z'
c.save!
- As a siteadmin, hit /api/v1/users/.../communication_channels, where
... is the id of the user that owns the communication channel
- Verify that the communication channel includes a
"last_bounce_at" key whose values is "2015-01-01T01:01:01.000Z"
- Transient bounce date:
- From a console, do the following, where "..." is the id of the
communication channel you're working with:
c = CommunicationChannel.find(...)
c.last_transient_bounce_at = '2015-01-01T01:01:01.000Z'
c.save!
- As a siteadmin, hit /api/v1/users/.../communication_channels, where
... is the id of the user that owns the communication channel
- Verify that the communication channel includes a
"last_transient_bounce_at" key whose values is "2015-01-01T01:01:01.000Z"
- Suppression bounce date:
- From a console, do the following, where "..." is the id of the
communication channel you're working with:
c = CommunicationChannel.find(...)
c.last_suppression_bounce_at = '2015-01-01T01:01:01.000Z'
c.save!
- As a siteadmin, hit /api/v1/users/.../communication_channels, where
... is the id of the user that owns the communication channel
- Verify that the communication channel includes a
"last_suppression_bounce_at" key whose values is "2015-01-01T01:01:01.000Z"
- Restricted to site admins:
- As the user whose communication channel you were working with,
hit /api/v1/users/.../communication_channels, where ... is that
user's id
- Verify that the communication channel does not include
"last_bounce_at", "last_suppression_bounce_at",
"last_transient_bounce_at", "last_bounce_summary",
or "last_transient_bounce_summary"
Change-Id: I10ed797620392229a55ffc797b2b35d3e979e19a
Reviewed-on: https://gerrit.instructure.com/62578
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>