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

runAs vs "without sharing" - who wins?
A test method uses runAs to apply some restrictive sharing rules applied to a particular user. However the class being executed by the test method is "without sharing".
I thought sharing rules would be ignored, but they weren't. Is this correct?
Perhaps you could elaborate on what you've done. Either you've got a bug on your hands, you've written a faulty test, or the code itself isn't written correctly (could be any of the three, hard to tell without code to reproduce).