function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
/** * Test class. */ @isTest private class SiteRegisterControllerTest { // Test method for verifying the positive test case static testMethod void testRegistration() { SiteRegisterController controller = new SiteRegisterController(); controller.username = 'test@force.com'; controller.email = 'test@force.com'; controller.communityNickname = 'test'; // registerUser always returns null when the page isn't accessed as a guest user System.assert(controller.registerUser() == null); controller.password = 'abcd1234'; controller.confirmPassword = 'abcd123'; System.assert(controller.registerUser() == null); } }
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_sites.htm
Make sure you are getting not null value