test controller method and view