[client] Write more thorough tests. Change 'components' to 'factory' in controllers.