2 |
3 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/CommunitiesSelfRegControllerTest.cls:
--------------------------------------------------------------------------------
1 | /**
2 | * An apex page controller that supports self registration of users in communities that allow self registration
3 | */
4 | @IsTest public with sharing class CommunitiesSelfRegControllerTest {
5 | @IsTest(SeeAllData=true)
6 | public static void testCommunitiesSelfRegController() {
7 | CommunitiesSelfRegController controller = new CommunitiesSelfRegController();
8 | controller.firstName = 'FirstName';
9 | controller.lastName = 'LastName';
10 | controller.email = 'test@force.com';
11 | controller.communityNickname = 'test';
12 |
13 | // registerUser will always return null when the page isn't accessed as a guest user
14 | System.assert(controller.registerUser() == null);
15 |
16 | controller.password = 'abcd1234';
17 | controller.confirmPassword = 'abcd123';
18 | System.assert(controller.registerUser() == null);
19 | }
20 | }
--------------------------------------------------------------------------------
/force-app/main/default/pages/StdExceptionTemplate.page:
--------------------------------------------------------------------------------
1 |