You need to sign in to do that
Don't have an account?

Testing Class for trigger on Converted Lead
Hi Community,
I have a trigger that takes the Contact ID that is created when a lead is converted and moves it back to a customer support Case. Works great using the lead.ConvertedContactId and lead.isConverted = true fields.
However, I cannot write a test class for this trigger because I cannot convert a lead via Apex nor can I insert a Contact Id into the ConvertedContactId field manually.
Any ideas on how to test this trigger?
I found it - was looking in the wrong places. For the record, here it is:
testLead1 and testUser1 are just records I inserted for the test.