fix tests for middleware not being inherited