moved views template app code to the test file