Share setup and run as another user
@TestSetup runs once per class, and every test method sees its rows.
Your task
Finish seed() so it creates a fixture user on a standard Salesforce profile that can edit Tasks and does not have Modify All Data, plus an Account that user owns, and make logCallAs insert a Task as that user.
@IsTest
public class AS_CB16E9892B08_SharingTests {
@TestSetup
static void setup() {
seed();
}
public static void seed() {
}
public static Id logCallAs(User fixture) {
return null;
}
}Requirements
- setupCreatedTheUser should pass
- setupAccountBelongsToFixture should pass
- runAsCreatesTaskAsFixture should pass
- logCallSavesTheTask should pass