Closed halfghaninne closed 8 years ago
Forgive my ignorance, but what sort of tests are we looking for with this issue?
@halfghaninne For you to clarify.
It's possible you were thinking about testing the interaction itself, of going to some page, filling out a form, and then expecting to see some content on the next page. If so, I might advise against that particular test for this scenario, since scaffolds are entirely a Rails feature and we don't need to retest their functionality.
I think we can confine tests to three buckets:
all
or where
, since those aren't our own methods).If you had other thoughts versus the above, please share. Otherwise, maybe tests for this feature aren't as necessary as I'd originally thought (I say "I'd" because I had initially been pushing for maybe overly-comprehensive test coverage).
I was thinking of interaction tests! I think testing forms is helpful in this case, since a new Position could potentially belong to an existing Entry, or create a whole new Entry upon its own creation. Maybe that's not as complicated as I'm making it out to be in my mind.
My thought process in writing tests
on Issues was to not forget to do it if it does fit one of those three guidelines.
Since the issue is just to scaffold the model with the properties you listed, it's not really clear what kind of interactions should be made possible for the resource. Could you add those in? I think those could then become the stem for whatever interaction tests you think are useful for this feature. That way Thorin can have a specific target for what to test, and we can help with the specifics of how to do it.
It might be good for you both to have a 20 minute session going over a 'Hello world!' template for interaction tests, since just getting started can be tough. Or maybe there's enough in the tests already (from tests you've already written) for Thorin to learn by example.
I'm amenable to either really.
Updated the Issue. I've already done some integration tests in spec/features files. This tutorial among others was helpful.
@tsbutler Take a look, and let us know if that's not enough for you to go on.
Will do. Thanks.