You need to sign in to do that
Don't have an account?
![james2000 james2000](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Help with user tests
Is there any workaround for creating users in a test method? I can't even compile code with a user insert statement and I get the error "DML not allowed on User".
How am I supposed to get test coverage on an insert trigger on User if I can't create a user in a test method?
I'm sure I can create an insert/update trigger and have code that ignores updates but that is a nasty hack.
How am I supposed to get test coverage on an insert trigger on User if I can't create a user in a test method?
I'm sure I can create an insert/update trigger and have code that ignores updates but that is a nasty hack.
I Suggest you add "after update" to your trigger, then you can at least write a test that will run it, inside your trigger you can determine if it is an insert or update and take different actions.