Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Testing
-
Labels:None
Description
From what I understand, there is no functional difference between:
def action =
{ [foo:'bar'] }and
def action =
{ render(model:[foo:'bar']) }However, if you do the first case in the ControllerUnitTestCase, the renderArgs aren't set. My suggestion would be to have newInstance() wrap the actions in another closure that set renderArgs.model to the returned value if the returned value is a map.
I would need convincing this is worth the effort involved. render(model:...) is hardly typical (or even recommended), so I can't really see the benefit. And anyway, I think renderArgs should only be populated if the render() method is called.