What to test exactly in a FeatureTest
websmurf opened this issue · 2 comments
websmurf commented
Hi there,
Just wondering about the following. What exact do you advise to test while testing a feature?
The response of the feature? Or if all steps that are defined are being called?
Best regards
Adam
Mulkave commented
Hi Adam,
Feature tests should be your functional tests, which is where you test it as a "client" with a Request/Response and you would assert the received response to be what you expect the client to receive, similar to Testing JSON APIs of the Laravel docs. Which means you'd make sure that the Feature is exposed correctly through the corresponding Route and Controller, and that it works as expected.
websmurf commented
Thanks, that makes sense