moved controllers template app code to the test file