-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b06f6f6
commit 54a90cc
Showing
2 changed files
with
45 additions
and
132 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ private class ScheduleSendEmailTest { | |
Account acc = TestDataFactory.createResidence('Residence', 'residence1', regAuth.Id, true); | ||
accList.add(acc); | ||
|
||
Account accRec = [SELECT Id ,ParentId FROM Account where Id =: acc.Id]; | ||
Account accRec = [SELECT Id , Name , ParentId FROM Account where Id =: acc.Id]; | ||
|
||
Contact con = new Contact( | ||
FirstName = 'Test', | ||
|
@@ -40,29 +40,4 @@ private class ScheduleSendEmailTest { | |
System.assertEquals(True, emailTem.size()>0, 'No Email is sent'); | ||
} | ||
|
||
@isTest | ||
static void testSendRenewalDueEmail() { | ||
|
||
|
||
List<Account> accList = new List<Account>(); | ||
|
||
// Create an instance of DMLOptions | ||
Database.DMLOptions dmlOptions = new Database.DMLOptions(); | ||
dmlOptions.DuplicateRuleHeader.allowSave = true; | ||
|
||
RegulatoryAuthorizationType regAuth = TestDataFactory.createRegAuth('Mental Health', 'License', 'MH', 1, 2, 3, 4, true); | ||
|
||
Account Residence = TestDataFactory.createResidence('Residence', 'hgvfjmhhgsu', regAuth.Id, true); | ||
|
||
Contact contactRec = TestDataFactory.createContactRecord(Residence.Id, '[email protected]', 'uysgyuskgfh', 'hsguh', true); | ||
|
||
//AccountContactRelation acConRelRec = TestDataFactory.createAccContRelRecord(Residence.Id, contactRec.Id , true, true, true); | ||
|
||
List<Id> contactIds = new List<Id>{ contactRec.Id }; | ||
Test.startTest(); | ||
ScheduleSendEmail.sendRenewalDueEmail(contactIds); | ||
Test.stopTest(); | ||
List<EmailTemplate> emailTem = [SELECT Id FROM EmailTemplate]; | ||
System.assertEquals(True, emailTem.size()>0, 'No Email is sent'); | ||
} | ||
} | ||
} |