Can someone tell me how I can avoid using (seealldata=TRUE) BUT still be able to access an existing Chatter Group in a test class?
Example with use of the SeeAllData=TRUE clause;
//Find Chatter Group ID
CollaborationGroup BCIGroup = [Select Id,Name
WHERE Name = 'All Company'
I am trying to add users to the group in my class but I run into a problem when creating the group, when seealldata is FALSE, because the test class still sees the chatter group to some degree. The group exists in both my sandbox and production environment.
Let me know if you want to see any of my code. This is part of a big chunk of code and there are a few classes involved so don't want to blast the forum with all the code.