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

Writing an inventory record duplication test #13

Open
Luke1982 opened this issue Jan 15, 2020 · 1 comment
Open

Writing an inventory record duplication test #13

Luke1982 opened this issue Jan 15, 2020 · 1 comment

Comments

@Luke1982
Copy link
Contributor

OK, so following up on the discussion on the gitter channel, I'd like to write a test that checks if the duplication of inventory records is correct. Mainly: if the inventory lines are copied over from the source, to the candidate destination record.

First thing: this is an integration test, not a unit test right?

@joebordes
Copy link
Contributor

this is two tests: a unit test and an integration test

for the unit test, you have to create tests for the getAssociatedProducts function. When a new inventory module is created this function is called to get the products to show. If it is coming from another module this function will retrieve them. So, you have to create unit tests that will send in all the different possibilities for the parameters and validate the response is what is expected.

That will mostly prove that the duplicate will work, but to be totally sure you would have to create an integration test that actually clicked on the duplicate button and validated the output in the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants