Hello again,
another weird potential bug I've found. This is about a controller test.
First, I placed the controller initialization in the packageSetup() function inside the test file. Implemented the first few tests, which went fine.
Then, a few tests later, my old tests suddenly failed. After some investigation, we figured out that arguments from other tests were passed to the same controller function. In the controller, we simply split the overview to _overview and overview as an example, _overview is a function that returns a struct and that's what we're testing. So when passing a filter as an argument in one test for example, it would pass that same filter to all consequent calls in the argument scope (even though other tests didn't pass those arguments at all).
We were really baffled about this for a while. In the end, it turns out what helped was to move the controller initialization to setup() instead, which runs before every test. Arguments no longer got cached from one test to another.
Now, onto the question… Is this a known bug, is it intended or is that an artifact of the cfwheels version we're using? Has anyone encountered this before?
Thanks,
Steven