Skip to content

Commit 2a7a82c

Browse files
authored
Merge pull request #620 from SFDO-Community/fixed_reg_unit_test_for_event_fee
Fixed reg unit test for event fee
2 parents 0167bd3 + 802c4dc commit 2a7a82c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

force-app/main/default/classes/SummitEventsRegisterController.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ public with sharing class SummitEventsRegisterController {
494494
}
495495
}
496496

497-
eventRegistration = rCRUD.updateRegistration(eventRegistration, eventInformation.registrationId, registrantAudience, eventFeeList);
497+
eventRegistration = rCRUD.updateRegistration(eventRegistration, incomingEventRegistrationId, registrantAudience, eventFeeList);
498498

499499
String dayOfWeek = SummitEventsShared.convertDateToDatetime(evtInstance.Instance_Start_Date__c, null, '').format('EEEE');
500500
//Insert pre-chosen appointments for appointments page

force-app/test/default/classes/SummitEventsRegister_TEST.cls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private class SummitEventsRegister_TEST {
280280
AND Registrant_Last_Name__c = 'Tester'
281281
AND Registrant_Email__c = '[email protected]'
282282
];
283-
//Original registration details have changed so old data should not exist.
283+
284284
System.assertEquals(registrations.size(), 0);
285285

286286
registrations = [
@@ -335,8 +335,8 @@ private class SummitEventsRegister_TEST {
335335
FROM Summit_Events_Fee__c
336336
WHERE Event_Registration__c = :registerController.eventRegistration.Id
337337
];
338-
//Extra added fee should be deleted and two should remain
339-
System.assertEquals(fees.size(), 2);
338+
//Extra added fee should be deleted and one should remain
339+
System.assertEquals(fees.size(), 1);
340340
Test.stopTest();
341341
}
342342
}

0 commit comments

Comments
 (0)