You need to sign in to do that
Don't have an account?
chris_centra
Do automated Chatter posts happen in test coverage?
When a Lead is Converted and the resulting Contact is attached to an existing Account, an automated Chatter post is created on the Account (Type=TrackedChange). I wrote a Trigger on Account to automatically delete that Chatter post as soon as it is created. Works great. I'm writing test coverage now, but it appears that the automated Chatter post is NOT being created when I do the Lead Conversion in the test coverage context. Is anyone familiar with this? Is there a way to make the automated Chatter post appear, or does this simply not happen in test coverage?
It appears that Apex tests do not commit changes to the DB and without committing changes to the DB the Feed Tracked Change will not be generated. It doesn't seem like it will be possible to write a test for this apex trigger.
All Answers
https://help.salesforce.com/articleView?id=collab_feed_tracking_overview.htm&type=5
For your June 5 response, it seems that DisableFeedTrackingHeader doesn't apply to Apex code, right? It seems to apply to APIs and web services, but I'm just talking about test coverage. Or maybe I'm not following your thinking?
It appears that Apex tests do not commit changes to the DB and without committing changes to the DB the Feed Tracked Change will not be generated. It doesn't seem like it will be possible to write a test for this apex trigger.