Add missing tests for render middleware