We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
7dad9a3#diff-577d62b36e2dae6cd625f41f3edbaca0ed6919f521fb344a72084d0d60b2a7c8
@isTest public class ProjectTHTest { @isTest public static void givenCreatedProjectWhenSyncProjectThenReturnSyncStatus() { User user = UserFixtureFactory.getUser(); String expectedPayload = TopiRun2021FixtureFactory.newProjectPayload(); Project__c projectToSync = ProjectFixtureFactory.createProject(); ProjectRepository repository = new ProjectRepository(); Test.setMock(HttpCalloutMock.class, new TopiRun2021ProjectHttpMock(expectedPayload, 200)); System.runAs(user) { projectToSync.Status__c = 'Iniciado'; repository.save(projectToSync); Project__c synchronizedProject = repository.findById(projectToSync.Id); System.assertEquals('Iniciado', synchronizedProject.Status__c); System.assertEquals('Enterprise', synchronizedProject.Type__c); // todo: discover how to fix this issue // for some reason, the project isn't entering afterUpdate and SyncStatus attr isn't updating // System.assertEquals('Integrado com sucesso', synchronizedProject.SynchronizationStatus__c); } } }
The text was updated successfully, but these errors were encountered:
Probably the project is entering afterUpdate and updating it, but the repository.findById method in line 24 is not returning updated data
Sorry, something went wrong.
rickybustillos
No branches or pull requests
7dad9a3#diff-577d62b36e2dae6cd625f41f3edbaca0ed6919f521fb344a72084d0d60b2a7c8
The text was updated successfully, but these errors were encountered: