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

Exception - Posting to chatter gives an exception
Hi
I am posting to chatter and I get below while a test runs and tries to execute the chatter apex code.
caused by: system.UnsupportedOperationException: ConnectApi methods are not supported in data siloed tests. Please use @IsTest(SeeAllData=true).
Has anyone faced this before. Thanks
I am posting to chatter and I get below while a test runs and tries to execute the chatter apex code.
caused by: system.UnsupportedOperationException: ConnectApi methods are not supported in data siloed tests. Please use @IsTest(SeeAllData=true).
Has anyone faced this before. Thanks
I have not ever worked upon the chatter APIs but by looking at this exception I can deduce that you will have to use @isTest(Seealldata=true) to the test classes where these chatter api are being used, since we cannot create chatter api related records in test class, we have to use organization data instead. To use organization data, we should place seealldata=true at the beginning of test class to resolve the issues.