{"action":"closed","issue":{"url":"https://api.github.com/repos/strongloop/loopback-example-access-control/issues/61","labels_url":"https://api.github.com/repos/strongloop/loopback-example-access-control/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-example-access-control/issues/61/comments","events_url":"https://api.github.com/repos/strongloop/loopback-example-access-control/issues/61/events","html_url":"https://github.com/strongloop/loopback-example-access-control/issues/61","id":96559419,"number":61,"title":"Testing dynamic roles","user":{"login":"teone","id":3929466,"avatar_url":"https://avatars.githubusercontent.com/u/3929466?v=3","gravatar_id":"","url":"https://api.github.com/users/teone","html_url":"https://github.com/teone","followers_url":"https://api.github.com/users/teone/followers","following_url":"https://api.github.com/users/teone/following{/other_user}","gists_url":"https://api.github.com/users/teone/gists{/gist_id}","starred_url":"https://api.github.com/users/teone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teone/subscriptions","organizations_url":"https://api.github.com/users/teone/orgs","repos_url":"https://api.github.com/users/teone/repos","events_url":"https://api.github.com/users/teone/events{/privacy}","received_events_url":"https://api.github.com/users/teone/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-example-access-control/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/strongloop/loopback-example-access-control/labels/triage","name":"triage","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"richardpringle","id":3286504,"avatar_url":"https://avatars.githubusercontent.com/u/3286504?v=3","gravatar_id":"","url":"https://api.github.com/users/richardpringle","html_url":"https://github.com/richardpringle","followers_url":"https://api.github.com/users/richardpringle/followers","following_url":"https://api.github.com/users/richardpringle/following{/other_user}","gists_url":"https://api.github.com/users/richardpringle/gists{/gist_id}","starred_url":"https://api.github.com/users/richardpringle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardpringle/subscriptions","organizations_url":"https://api.github.com/users/richardpringle/orgs","repos_url":"https://api.github.com/users/richardpringle/repos","events_url":"https://api.github.com/users/richardpringle/events{/privacy}","received_events_url":"https://api.github.com/users/richardpringle/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-07-22T12:40:26Z","updated_at":"2015-11-17T21:27:16Z","closed_at":"2015-11-17T21:27:16Z","body":"Hi everybody,\r\n\r\nas per my understandings the `Role.registerResolver` callback is triggered only if someone try to access a route where this role is used in the Acl.\r\n\r\nI'm wondering which is the best way to write test for dynamic roles, as now I found out two ways:\r\n- using [loopback-testing](https://github.com/strongloop/loopback-testing) to perform e2e test on protected routes\r\n- perform unit tests on the `Role.registerResolver` callback\r\n\r\nAny suggestion?"}}