{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/9656","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/9656/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/9656/comments","events_url":"https://api.github.com/repos/angular/angular/issues/9656/events","html_url":"https://github.com/angular/angular/issues/9656","id":162601786,"number":9656,"title":"Angular1_router | How to unit test code insdie $canActivate hook","user":{"login":"pranav-xx","id":35722,"avatar_url":"https://avatars.githubusercontent.com/u/35722?v=3","gravatar_id":"","url":"https://api.github.com/users/pranav-xx","html_url":"https://github.com/pranav-xx","followers_url":"https://api.github.com/users/pranav-xx/followers","following_url":"https://api.github.com/users/pranav-xx/following{/other_user}","gists_url":"https://api.github.com/users/pranav-xx/gists{/gist_id}","starred_url":"https://api.github.com/users/pranav-xx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranav-xx/subscriptions","organizations_url":"https://api.github.com/users/pranav-xx/orgs","repos_url":"https://api.github.com/users/pranav-xx/repos","events_url":"https://api.github.com/users/pranav-xx/events{/privacy}","received_events_url":"https://api.github.com/users/pranav-xx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-28T04:49:44Z","updated_at":"2016-06-29T08:23:43Z","closed_at":null,"body":"I am submitting this to check what is the recommended way to uni test code inside $canActivate.\r\n\r\nI am currently using angular1_router with angular js 1.5. While all other lifecycle hooks are written inside controller, I can unit test them.\r\n\r\nBut since $canActivate is part of component configuration inside an IIFE, how to unit test it?"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/229289572","html_url":"https://github.com/angular/angular/issues/9656#issuecomment-229289572","issue_url":"https://api.github.com/repos/angular/angular/issues/9656","id":229289572,"user":{"login":"pranav-xx","id":35722,"avatar_url":"https://avatars.githubusercontent.com/u/35722?v=3","gravatar_id":"","url":"https://api.github.com/users/pranav-xx","html_url":"https://github.com/pranav-xx","followers_url":"https://api.github.com/users/pranav-xx/followers","following_url":"https://api.github.com/users/pranav-xx/following{/other_user}","gists_url":"https://api.github.com/users/pranav-xx/gists{/gist_id}","starred_url":"https://api.github.com/users/pranav-xx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranav-xx/subscriptions","organizations_url":"https://api.github.com/users/pranav-xx/orgs","repos_url":"https://api.github.com/users/pranav-xx/repos","events_url":"https://api.github.com/users/pranav-xx/events{/privacy}","received_events_url":"https://api.github.com/users/pranav-xx/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T08:23:43Z","updated_at":"2016-06-29T08:23:43Z","body":"Please let me know where to raise this. I thought this is the right forum to ask this question."}}
{"actor":{"display_login":"pranav-xx"}}