Added: tests for tests middleware.
Changed: jobs and template modules tests due to bigger changes in mocks.