{"action":"created","comment":{"url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/comments/191061979","pull_request_review_id":123569937,"id":191061979,"diff_hunk":"@@ -0,0 +1,34 @@\n+import { TestBed, inject } from '@angular/core/testing';\n+\n+import { AbilitiesService } from './abilities.service';\n+import { Hero } from './hero';\n+\n+describe('AbilitiesService', () => {\n+  beforeEach(() => {\n+    TestBed.configureTestingModule({\n+      providers: [AbilitiesService]\n+    });\n+  });\n+\n+  it('should be created', inject([AbilitiesService], (service: AbilitiesService) => {\n+    expect(service).toBeTruthy();\n+  }));\n+\n+  it('should return abilities', inject([AbilitiesService], (service: AbilitiesService) => {\n+    expect(service.getAvailableAbilities().length).toBeGreaterThan(0);\n+  }));\n+\n+  it('should set ability for hero', inject([AbilitiesService], (service: AbilitiesService) => {\n+    let hero: Hero = { id: 1, name: 'spider boy'};\n+    let abilities: String[] = ['speed', 'flight']\n+    expect(() => service.setAbilitiesForHero(hero, abilities)).not.toThrow();\n+    expect(service.getAbilitiesForHero(hero)).toBe(abilities);\n+  }));\n+\n+  it('should only set legal abilities', inject([AbilitiesService], (service: AbilitiesService) => {\n+    let hero: Hero = { id: 1, name: 'spider boy'};\n+    let abilities: String[] = ['illegal ability']\n+    expect(() => service.setAbilitiesForHero(hero, abilities)).toThrow(Error(\"illegal abilities\"));\n+  }));\n+","path":"src/app/abilities.service.spec.ts","position":33,"original_position":33,"commit_id":"917972d4635ca78cabdf12614e1fbf257759c9de","original_commit_id":"481c772a9557967897a622bbd096dff48f1ff6a5","user":{"login":"brad-bow","id":39000216,"avatar_url":"https://avatars1.githubusercontent.com/u/39000216?v=4","gravatar_id":"","url":"https://api.github.com/users/brad-bow","html_url":"https://github.com/brad-bow","followers_url":"https://api.github.com/users/brad-bow/followers","following_url":"https://api.github.com/users/brad-bow/following{/other_user}","gists_url":"https://api.github.com/users/brad-bow/gists{/gist_id}","starred_url":"https://api.github.com/users/brad-bow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brad-bow/subscriptions","organizations_url":"https://api.github.com/users/brad-bow/orgs","repos_url":"https://api.github.com/users/brad-bow/repos","events_url":"https://api.github.com/users/brad-bow/events{/privacy}","received_events_url":"https://api.github.com/users/brad-bow/received_events","type":"User","site_admin":false},"body":"I'd like to see a test for setting the hero's abilities to an empty array.","created_at":"2018-05-27T01:10:08Z","updated_at":"2018-05-27T01:10:19Z","html_url":"https://github.com/beeleebow/rewriting-git-history/pull/4#discussion_r191061979","pull_request_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/comments/191061979"},"html":{"href":"https://github.com/beeleebow/rewriting-git-history/pull/4#discussion_r191061979"},"pull_request":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4","id":186148881,"html_url":"https://github.com/beeleebow/rewriting-git-history/pull/4","diff_url":"https://github.com/beeleebow/rewriting-git-history/pull/4.diff","patch_url":"https://github.com/beeleebow/rewriting-git-history/pull/4.patch","issue_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/4","number":4,"state":"open","locked":false,"title":"Feature/hero ability selection","user":{"login":"beeleebow","id":5163176,"avatar_url":"https://avatars2.githubusercontent.com/u/5163176?v=4","gravatar_id":"","url":"https://api.github.com/users/beeleebow","html_url":"https://github.com/beeleebow","followers_url":"https://api.github.com/users/beeleebow/followers","following_url":"https://api.github.com/users/beeleebow/following{/other_user}","gists_url":"https://api.github.com/users/beeleebow/gists{/gist_id}","starred_url":"https://api.github.com/users/beeleebow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeleebow/subscriptions","organizations_url":"https://api.github.com/users/beeleebow/orgs","repos_url":"https://api.github.com/users/beeleebow/repos","events_url":"https://api.github.com/users/beeleebow/events{/privacy}","received_events_url":"https://api.github.com/users/beeleebow/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-05T09:41:57Z","updated_at":"2018-05-27T01:10:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"569f12e699b497c49b94c7cc08e699590254b0dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4/commits","review_comments_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4/comments","review_comment_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/comments{/number}","comments_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/4/comments","statuses_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/statuses/917972d4635ca78cabdf12614e1fbf257759c9de","head":{"label":"beeleebow:feature/hero-ability-selection","ref":"feature/hero-ability-selection","sha":"917972d4635ca78cabdf12614e1fbf257759c9de","user":{"login":"beeleebow","id":5163176,"avatar_url":"https://avatars2.githubusercontent.com/u/5163176?v=4","gravatar_id":"","url":"https://api.github.com/users/beeleebow","html_url":"https://github.com/beeleebow","followers_url":"https://api.github.com/users/beeleebow/followers","following_url":"https://api.github.com/users/beeleebow/following{/other_user}","gists_url":"https://api.github.com/users/beeleebow/gists{/gist_id}","starred_url":"https://api.github.com/users/beeleebow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeleebow/subscriptions","organizations_url":"https://api.github.com/users/beeleebow/orgs","repos_url":"https://api.github.com/users/beeleebow/repos","events_url":"https://api.github.com/users/beeleebow/events{/privacy}","received_events_url":"https://api.github.com/users/beeleebow/received_events","type":"User","site_admin":false},"repo":{"id":130549305,"name":"rewriting-git-history","full_name":"beeleebow/rewriting-git-history","owner":{"login":"beeleebow","id":5163176,"avatar_url":"https://avatars2.githubusercontent.com/u/5163176?v=4","gravatar_id":"","url":"https://api.github.com/users/beeleebow","html_url":"https://github.com/beeleebow","followers_url":"https://api.github.com/users/beeleebow/followers","following_url":"https://api.github.com/users/beeleebow/following{/other_user}","gists_url":"https://api.github.com/users/beeleebow/gists{/gist_id}","starred_url":"https://api.github.com/users/beeleebow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeleebow/subscriptions","organizations_url":"https://api.github.com/users/beeleebow/orgs","repos_url":"https://api.github.com/users/beeleebow/repos","events_url":"https://api.github.com/users/beeleebow/events{/privacy}","received_events_url":"https://api.github.com/users/beeleebow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/beeleebow/rewriting-git-history","description":"A demonstration repo, used in my \"Rewriting Git History\" Pluralsight course","fork":false,"url":"https://api.github.com/repos/beeleebow/rewriting-git-history","forks_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/forks","keys_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/teams","hooks_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/hooks","issue_events_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/events{/number}","events_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/events","assignees_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/assignees{/user}","branches_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/branches{/branch}","tags_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/tags","blobs_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/refs{/sha}","trees_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/statuses/{sha}","languages_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/languages","stargazers_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/stargazers","contributors_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/contributors","subscribers_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/subscribers","subscription_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/subscription","commits_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/commits{/sha}","git_commits_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/commits{/sha}","comments_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/comments{/number}","issue_comment_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/comments{/number}","contents_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/contents/{+path}","compare_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/merges","archive_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/downloads","issues_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues{/number}","pulls_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls{/number}","milestones_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/milestones{/number}","notifications_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/labels{/name}","releases_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/releases{/id}","deployments_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/deployments","created_at":"2018-04-22T08:32:39Z","updated_at":"2018-05-08T21:31:17Z","pushed_at":"2018-05-27T01:04:05Z","git_url":"git://github.com/beeleebow/rewriting-git-history.git","ssh_url":"git@github.com:beeleebow/rewriting-git-history.git","clone_url":"https://github.com/beeleebow/rewriting-git-history.git","svn_url":"https://github.com/beeleebow/rewriting-git-history","homepage":null,"size":179,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"beeleebow:master","ref":"master","sha":"69b2090690260f6c0e073c645b79dd72eaa85592","user":{"login":"beeleebow","id":5163176,"avatar_url":"https://avatars2.githubusercontent.com/u/5163176?v=4","gravatar_id":"","url":"https://api.github.com/users/beeleebow","html_url":"https://github.com/beeleebow","followers_url":"https://api.github.com/users/beeleebow/followers","following_url":"https://api.github.com/users/beeleebow/following{/other_user}","gists_url":"https://api.github.com/users/beeleebow/gists{/gist_id}","starred_url":"https://api.github.com/users/beeleebow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeleebow/subscriptions","organizations_url":"https://api.github.com/users/beeleebow/orgs","repos_url":"https://api.github.com/users/beeleebow/repos","events_url":"https://api.github.com/users/beeleebow/events{/privacy}","received_events_url":"https://api.github.com/users/beeleebow/received_events","type":"User","site_admin":false},"repo":{"id":130549305,"name":"rewriting-git-history","full_name":"beeleebow/rewriting-git-history","owner":{"login":"beeleebow","id":5163176,"avatar_url":"https://avatars2.githubusercontent.com/u/5163176?v=4","gravatar_id":"","url":"https://api.github.com/users/beeleebow","html_url":"https://github.com/beeleebow","followers_url":"https://api.github.com/users/beeleebow/followers","following_url":"https://api.github.com/users/beeleebow/following{/other_user}","gists_url":"https://api.github.com/users/beeleebow/gists{/gist_id}","starred_url":"https://api.github.com/users/beeleebow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeleebow/subscriptions","organizations_url":"https://api.github.com/users/beeleebow/orgs","repos_url":"https://api.github.com/users/beeleebow/repos","events_url":"https://api.github.com/users/beeleebow/events{/privacy}","received_events_url":"https://api.github.com/users/beeleebow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/beeleebow/rewriting-git-history","description":"A demonstration repo, used in my \"Rewriting Git History\" Pluralsight course","fork":false,"url":"https://api.github.com/repos/beeleebow/rewriting-git-history","forks_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/forks","keys_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/teams","hooks_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/hooks","issue_events_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/events{/number}","events_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/events","assignees_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/assignees{/user}","branches_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/branches{/branch}","tags_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/tags","blobs_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/refs{/sha}","trees_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/statuses/{sha}","languages_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/languages","stargazers_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/stargazers","contributors_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/contributors","subscribers_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/subscribers","subscription_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/subscription","commits_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/commits{/sha}","git_commits_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/git/commits{/sha}","comments_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/comments{/number}","issue_comment_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/comments{/number}","contents_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/contents/{+path}","compare_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/merges","archive_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/downloads","issues_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues{/number}","pulls_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls{/number}","milestones_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/milestones{/number}","notifications_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/labels{/name}","releases_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/releases{/id}","deployments_url":"https://api.github.com/repos/beeleebow/rewriting-git-history/deployments","created_at":"2018-04-22T08:32:39Z","updated_at":"2018-05-08T21:31:17Z","pushed_at":"2018-05-27T01:04:05Z","git_url":"git://github.com/beeleebow/rewriting-git-history.git","ssh_url":"git@github.com:beeleebow/rewriting-git-history.git","clone_url":"https://github.com/beeleebow/rewriting-git-history.git","svn_url":"https://github.com/beeleebow/rewriting-git-history","homepage":null,"size":179,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4"},"html":{"href":"https://github.com/beeleebow/rewriting-git-history/pull/4"},"issue":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/4"},"comments":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/beeleebow/rewriting-git-history/statuses/917972d4635ca78cabdf12614e1fbf257759c9de"}},"author_association":"OWNER"}}
{"actor":{"display_login":"brad-bow"}}