tests for controller and view