Write tests for profiles controller