Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-14773814 - Fix bug that prevents Address__c.MailingState__c from being encrypted #7225

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions force-app/test/ADDR_Addresses_TEST.cls
Original file line number Diff line number Diff line change
Expand Up @@ -809,10 +809,14 @@ public with sharing class ADDR_Addresses_TEST {
);
insert contact;

Address__c overrideAddress = [SELECT Undeliverable__c
FROM Address__c
WHERE MailingState__c = 'Pennsylvania'];

Address__c overrideAddress;
for (Address__c addr : [SELECT Id, MailingState__c, Undeliverable__c FROM Address__c]) {
if (addr.MailingState__c == 'Pennsylvania') {
overrideAddress = addr;
break;
}
}

Test.startTest();
overrideAddress.Undeliverable__c = true;
update overrideAddress;
Expand Down Expand Up @@ -2229,10 +2233,14 @@ public with sharing class ADDR_Addresses_TEST {
insert testContact;
Test.stopTest();

Address__c testAddress = [SELECT Latest_Start_Date__c, Default_Address__c
FROM Address__c
WHERE MailingState__c = 'Washington'
LIMIT 1];
Address__c testAddress;
for (Address__c addr : [SELECT Id, MailingState__c, Latest_Start_Date__c, Default_Address__c FROM Address__c]) {
if (addr.MailingState__c == 'Washington') {
testAddress = addr;
break;
}
}

System.assertEquals(true, testAddress.Default_Address__c, 'Address should be set as the default address.');
System.assertEquals(System.today(), testAddress.Latest_Start_Date__c, 'The default address latest start date ' +
'should be set to today\'s date.');
Expand Down Expand Up @@ -2548,7 +2556,6 @@ public with sharing class ADDR_Addresses_TEST {
MailingStreet__c, MailingCity__c, MailingState__c,
MailingPostalCode__c, MailingCountry__c
FROM Address__c
ORDER BY MailingState__c
];
}

Expand Down
Loading