I have an approval process for which the intial submitter who creates the opportunity is to be 'Raj'. When I write the test class for it I assign the opportunity owner using a soql query
op.owner = [SELECT Name FROM User where name = 'Raj' and isActive = true];
On running the test class it is printing that opportunity owner is assigned as Raj in debug log. But when it is checking with the approval process. It is showing the intial submitter as me. I dunno how to change the initial submitter for this approval process in apex test class.
Any Help is much appreciated!
Thank you, Prasanth