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

I have an issue in AccountHandlerTests #8

Closed
elliot41 opened this issue Nov 24, 2021 · 6 comments
Closed

I have an issue in AccountHandlerTests #8

elliot41 opened this issue Nov 24, 2021 · 6 comments

Comments

@elliot41
Copy link
Contributor

Hello James,

I just push all the classes in a new Salesforce Org, and I launched the method it_should_insert_new_opps_when_accounts_are_inserted.

And I had this error :
image

Thanks for your help.

@elliot41
Copy link
Contributor Author

It seems that it launch the crud instead of the crudmock.

@elliot41 elliot41 changed the title Error in AccountHandlerTests I have an issue in AccountHandlerTests Nov 24, 2021
@jamessimone
Copy link
Owner

@elliot41 it does seem that way. I haven’t looked at the example app in a long time - note that that directory is not actually necessary and is meant to be purely an example - but I will get this fixed up later today.

@jamessimone
Copy link
Owner

@elliot41 you should be all set with the updates I just pushed!

@elliot41
Copy link
Contributor Author

@jamessimone it worked well, thanks ! I'm still impressed that we have 100% code coverage on the class without any dml operation 😱

@elliot41
Copy link
Contributor Author

Can I push my modifications on the example-app ? I added an account.trigger file, and I pass the method from before to afterInsert to get the opp linked to the created accounts.

@jamessimone
Copy link
Owner

@elliot41 you will have to fork the repository, push your changes there, and open a pull request for me to review. I will then be able to see what you’re talking about. Please keep in mind that the example-app is meant to be an extremely minimal representation of how the factory, dependency injection, and the DMLMock play together.

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

2 participants