Tests for context menu directive

This PR adds tests for the context menu directive. It also shows to write tests for directives using `templateUrl` and making Ajax/JSON requests with the `$http` service.