How to best bypass Validation Rules on Opportunity without touching fflib code? #362
-
Hi there, in our current project we use fflib commons as well as fflib mocks. We have a validation rule on Opportunity in place which causes failing test runs in fflib_SObjectUnitOfWorkTest. The only way we can solve is by change the user context in which the test runs with the side effect that we have to change code (add System.runAs(...)). We want to avoid touching the librarie's code, but don't find a proper means to solve that. Does anyone has a suggestion regarding this? Best Nils |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Could you try to see if this PR #290 resolves your problem? Regards, William |
Beta Was this translation helpful? Give feedback.
-
G'day @theflyingdutch and @wimvelzeboer -- I have reviewed PR #290 and merged it into the main branch. You should be good to go now. Thanks for raising the issue report. Cheers! |
Beta Was this translation helpful? Give feedback.
Hi @theflyingdutch
Could you try to see if this PR #290 resolves your problem?
That removes a lot of the DML transactions that might be the cause of your issues.
Regards,
William