Would be matter of testing the view using the actual html contents, which is admittedly not as sexy as just unit testing it. The frontier between unit, integration and function tests is still blurry to me, though my feeling is that we should probably not overengineer things just to make them unit testable.