I always wonder this as I write integration tests: at what point is the test "too" long.
For example I have some tests that go through a website to create various things (Widgets) we'll call them.
FactoryGirl to basically set up the "minimal" amount of information needed in the database. (Users/Companies) mainly that this widget gets created under.
However, I also want to test deleting of the widget. So....I can either set up every single part of the "Widget" creation from within various factories, which is both time-consuming, ugly and technically incorrect. (Technically incorrect because to delete something, a user would have to create it first as opposed to it just "being there", and ugly...I guess because you are adding a ton of factories just to support a simple deletion test)
or I can go through the creation of the widget process THEN deleting the widget in one test.
Is this bad practice? It mimics what the user would do more-so than setting up the widget data and then having a small test that clicks a delete button. Or am I looking at this the wrong way?