moved actions controller app code to the test file