We have a Sandbox_1 where all unit tests are running properly, and we want to deploy our code to an entirely different organization via our repository
When running unit tests we have issues with sharing (users with custom profiles "hiringManager" see too many Job_Application__c records when unit tests are running with System.runAs(hiringManager)
What could be the reason of this?
OWD is the same for Job_Application__c, roles are also the same, profile "hiringManager" also have the same settings for Job_Application__c object.
What else should we check?
When doing deployment, this unit test fails, but when we deployed code to the Sandbox_0 (created from the Production that we want to deploy), the unit test is passing (but only when runned separately - not when all unit tests runs - because then it fails)
Are unit tests during the deployment via SFDX from repository is executed asynchronously? I think that during deployment, all unit tests run synchronously
I was using that command for deployment:
sfdx force:source:deploy -u user0@gmail.com -c -p force-app/main/default