-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feature/change-contact-consent-to-read-only (#7392)"
This reverts commit 96f966f.
- Loading branch information
1 parent
c295b78
commit 1dc228e
Showing
15 changed files
with
162 additions
and
296 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -32,6 +32,7 @@ describe('contact form service', () => { | |
primary: true, | ||
full_telephone_number: '+1 652423467167', | ||
email: '[email protected]', | ||
accepts_dit_email_marketing: true, | ||
address_same_as_company: false, | ||
notes: 'Some notes', | ||
archived_by: null, | ||
|
@@ -59,6 +60,7 @@ describe('contact form service', () => { | |
primary: 'yes', | ||
full_telephone_number: '+1 652423467167', | ||
email: '[email protected]', | ||
accepts_dit_email_marketing: true, | ||
address_same_as_company: 'no', | ||
address_1: '99 N Shore Road', | ||
address_2: 'Suite 20', | ||
|
@@ -105,6 +107,7 @@ describe('contact form service', () => { | |
address_postcode: null, | ||
address_country: null, | ||
notes: 'Some notes', | ||
accepts_dit_email_marketing: true, | ||
} | ||
|
||
const actual = contactFormService.getContactAsFormData(contact) | ||
|
@@ -115,5 +118,15 @@ describe('contact form service', () => { | |
it('should handle a null contact', () => { | ||
expect(contactFormService.getContactAsFormData(null)).to.be.null | ||
}) | ||
|
||
context('when the contact accepts DBT email marketing', () => { | ||
it('should set the marketing preferences to accepts_dit_email_marketing', () => { | ||
const contact = assign({}, contactData, { | ||
accepts_dit_email_marketing: true, | ||
}) | ||
const actual = contactFormService.getContactAsFormData(contact) | ||
expect(actual.accepts_dit_email_marketing).to.be.true | ||
}) | ||
}) | ||
}) | ||
}) |
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ const CONTACT = { | |
telephoneCountrycode: '123', | ||
telephoneNumber: '456789', | ||
email: '[email protected]', | ||
acceptsDitEmailMarketing: true, | ||
addressSameAsCompany: true, | ||
address1: 'Foo', | ||
address2: 'Bar', | ||
|
@@ -111,6 +112,7 @@ export default { | |
addressCountry: null, | ||
addressPostcode: null, | ||
notes: null, | ||
acceptsDitEmailMarketing: false, | ||
archived: false, | ||
archivedDocumentsUrlPath: '', | ||
archivedOn: null, | ||
|
25 changes: 0 additions & 25 deletions
25
src/client/modules/Contacts/ContactDetails/ConsentDetails.jsx
This file was deleted.
Oops, something went wrong.
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
93 changes: 0 additions & 93 deletions
93
src/client/modules/Contacts/ContactDetails/__test__/transformers.test.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.