Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectApiHelperTest: "Context user does not have permission to create rich text in feed" #32

Open
cropredyHelix opened this issue May 26, 2021 · 1 comment

Comments

@cropredyHelix
Copy link

I installed the software from UnofficialSF.com and when running unit tests, got this error

Class.ConnectApi.ChatterFeeds.postFeedElement: line 1458, column 1
Class.ConnectApiHelperTest.testCreateInputFromBody: line 257, column 1
10:18:52.130 (194554713)|FATAL_ERROR|ConnectApi.ConnectApiException: Context user does not have permission to create rich text in feed

The ContextUser is UserInfo.getUserId() - which is me, user with System Admin profile. The test appears to be posting a bolded element.

test class is V47

Network.getNetworkId() returns null for the test context

What permission to I need to setup for the running user to be able to execute this unit test?

@cropredyHelix
Copy link
Author

You can resolve this - the answer is here in stackexchange. You might want to put a comment in the test method to indicate what to do if this error occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant