-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed next to register for add question btn when no more pages present
- Loading branch information
1 parent
6952f83
commit 3ad5601
Showing
3 changed files
with
48 additions
and
2 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
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 |
---|---|---|
|
@@ -52,4 +52,49 @@ public class SummitEventsRegistration_TEST { | |
System.assertEquals(emailTasks.size(), 2); | ||
Test.stopTest(); | ||
} | ||
|
||
@IsTest | ||
public static void TestSummitEventsMultiRegistration() { | ||
|
||
List<Summit_Events_Instance__c> seaTestInstances = SummitEventsTestSharedDataFactory.createTestEvent(); | ||
|
||
List<Summit_Events_Registration__c> seaRegistrations = new List<Summit_Events_Registration__c>(); | ||
|
||
for (Integer x = 0; x < 5; x++) { | ||
Summit_Events_Registration__c seaTestRegistration = SummitEventsTestSharedDataFactory.createEventRegistration(seaTestInstances[1], 'Test' + x, 'Tester' + x, 'test+' + x + '@test.net', '55555', '1971-03-22', '2012', null); | ||
seaRegistrations.add(seaTestRegistration); | ||
} | ||
|
||
Summit_Events__c seaTestEvent = SummitEventsTestSharedDataFactory.getEventRecord(seaTestInstances[1].Event__c); | ||
|
||
Summit_Events_Email__c email1 = new Summit_Events_Email__c(); | ||
email1.Event__c = seaTestInstances[1].Event__c; | ||
email1.Action_Status__c = 'Registered'; | ||
email1.Email_Content__c = 'Sample text here'; | ||
email1.Letterhead_HTML__c = 'Letterhead goes here<br/>[[DONT_DELETE_CONTENT_HERE]]'; | ||
email1.BCC_Email__c = '[email protected]'; | ||
insert email1; | ||
|
||
Test.startTest(); | ||
List<Id> contactIds = new List<Id>(); | ||
List<Id> registrationIds = new List<Id>(); | ||
for (Summit_Events_Registration__c seaRegistration : seaRegistrations) { | ||
seaRegistration.Status__c = 'Registered'; | ||
contactIds.add(seaRegistration.Contact__c); | ||
registrationIds.add(seaRegistration.Id); | ||
} | ||
update seaRegistrations; | ||
|
||
List<Task> emailTasks = [ | ||
SELECT Id, Subject, Description | ||
FROM Task | ||
WHERE WhatId IN :registrationIds | ||
AND Type = 'Email' | ||
AND Status = 'Completed' | ||
AND Priority = 'Low' | ||
AND WhoId IN :contactIds | ||
]; | ||
System.assertEquals(emailTasks.size(), 5); | ||
Test.stopTest(); | ||
} | ||
} |