Testing controllers and directives