{"action":"created","comment":{"url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/comments/42369138","id":42369138,"diff_hunk":"@@ -0,0 +1,38 @@\n+(function () {\n+    'use strict';\n+    describe('Test CharacterLogic', function () {\n+        var state,\n+            timeout,\n+            endOfGame;\n+\n+        beforeEach(function(){\n+            module('ui.router');\n+            module('Controllers.MyModule');\n+            module('Services.MyModule', function(){\n+            });\n+\n+            inject(function($injector){\n+                state= $injector.get('$state');\n+                timeout = $injector.get('$timeout');\n+                endOfGame = $injector.get('EndOfGame')\n+            });\n+        });\n+\n+        it('Checks that the state changes to draw when game is drawn.', function(){\n+            endOfGame.outcome ='Draw';\n+            endOfGame.gameEnded();\n+            timeout.flush();\n+            state.current.url.should.equal('/draw');\n+        });\n+\n+        it('Checks that the state changes to draw when game is won.', function(){\n+            endOfGame.outcome ='Win';\n+            endOfGame.gameEnded();\n+            timeout.flush();\n+            state.current.url.should.equal('/winner');","path":".unit-test/endOfGame-test.js","position":32,"original_position":32,"commit_id":"9f23a399b12e636d3ebc0f8f1fea049319597064","original_commit_id":"9f23a399b12e636d3ebc0f8f1fea049319597064","user":{"login":"keithbarrow","id":8112111,"avatar_url":"https://avatars.githubusercontent.com/u/8112111?v=3","gravatar_id":"","url":"https://api.github.com/users/keithbarrow","html_url":"https://github.com/keithbarrow","followers_url":"https://api.github.com/users/keithbarrow/followers","following_url":"https://api.github.com/users/keithbarrow/following{/other_user}","gists_url":"https://api.github.com/users/keithbarrow/gists{/gist_id}","starred_url":"https://api.github.com/users/keithbarrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithbarrow/subscriptions","organizations_url":"https://api.github.com/users/keithbarrow/orgs","repos_url":"https://api.github.com/users/keithbarrow/repos","events_url":"https://api.github.com/users/keithbarrow/events{/privacy}","received_events_url":"https://api.github.com/users/keithbarrow/received_events","type":"User","site_admin":false},"body":"Better to mock $state and ensure the `go('/winner')` function is called instead.","created_at":"2015-10-19T13:20:09Z","updated_at":"2015-10-19T13:20:09Z","html_url":"https://github.com/danpottshimself/noughts-and-crosses/pull/7#discussion_r42369138","pull_request_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/comments/42369138"},"html":{"href":"https://github.com/danpottshimself/noughts-and-crosses/pull/7#discussion_r42369138"},"pull_request":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7","id":47766828,"html_url":"https://github.com/danpottshimself/noughts-and-crosses/pull/7","diff_url":"https://github.com/danpottshimself/noughts-and-crosses/pull/7.diff","patch_url":"https://github.com/danpottshimself/noughts-and-crosses/pull/7.patch","issue_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/7","number":7,"state":"open","locked":false,"title":"End of game test","user":{"login":"danpottshimself","id":13645940,"avatar_url":"https://avatars.githubusercontent.com/u/13645940?v=3","gravatar_id":"","url":"https://api.github.com/users/danpottshimself","html_url":"https://github.com/danpottshimself","followers_url":"https://api.github.com/users/danpottshimself/followers","following_url":"https://api.github.com/users/danpottshimself/following{/other_user}","gists_url":"https://api.github.com/users/danpottshimself/gists{/gist_id}","starred_url":"https://api.github.com/users/danpottshimself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpottshimself/subscriptions","organizations_url":"https://api.github.com/users/danpottshimself/orgs","repos_url":"https://api.github.com/users/danpottshimself/repos","events_url":"https://api.github.com/users/danpottshimself/events{/privacy}","received_events_url":"https://api.github.com/users/danpottshimself/received_events","type":"User","site_admin":false},"body":"Created a test for the end of game function which tests if the state changes when a win or draw is passed through.\r\n\r\nAlso added directives for the game-won and game-drawn html to fix bug.","created_at":"2015-10-15T10:07:31Z","updated_at":"2015-10-19T13:20:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eea6caa6b8c67fc7607f270946b13fad64b252b8","assignee":{"login":"keithbarrow","id":8112111,"avatar_url":"https://avatars.githubusercontent.com/u/8112111?v=3","gravatar_id":"","url":"https://api.github.com/users/keithbarrow","html_url":"https://github.com/keithbarrow","followers_url":"https://api.github.com/users/keithbarrow/followers","following_url":"https://api.github.com/users/keithbarrow/following{/other_user}","gists_url":"https://api.github.com/users/keithbarrow/gists{/gist_id}","starred_url":"https://api.github.com/users/keithbarrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithbarrow/subscriptions","organizations_url":"https://api.github.com/users/keithbarrow/orgs","repos_url":"https://api.github.com/users/keithbarrow/repos","events_url":"https://api.github.com/users/keithbarrow/events{/privacy}","received_events_url":"https://api.github.com/users/keithbarrow/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7/commits","review_comments_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7/comments","review_comment_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/7/comments","statuses_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/statuses/9f23a399b12e636d3ebc0f8f1fea049319597064","head":{"label":"danpottshimself:endOfGameTest","ref":"endOfGameTest","sha":"9f23a399b12e636d3ebc0f8f1fea049319597064","user":{"login":"danpottshimself","id":13645940,"avatar_url":"https://avatars.githubusercontent.com/u/13645940?v=3","gravatar_id":"","url":"https://api.github.com/users/danpottshimself","html_url":"https://github.com/danpottshimself","followers_url":"https://api.github.com/users/danpottshimself/followers","following_url":"https://api.github.com/users/danpottshimself/following{/other_user}","gists_url":"https://api.github.com/users/danpottshimself/gists{/gist_id}","starred_url":"https://api.github.com/users/danpottshimself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpottshimself/subscriptions","organizations_url":"https://api.github.com/users/danpottshimself/orgs","repos_url":"https://api.github.com/users/danpottshimself/repos","events_url":"https://api.github.com/users/danpottshimself/events{/privacy}","received_events_url":"https://api.github.com/users/danpottshimself/received_events","type":"User","site_admin":false},"repo":{"id":42048006,"name":"noughts-and-crosses","full_name":"danpottshimself/noughts-and-crosses","owner":{"login":"danpottshimself","id":13645940,"avatar_url":"https://avatars.githubusercontent.com/u/13645940?v=3","gravatar_id":"","url":"https://api.github.com/users/danpottshimself","html_url":"https://github.com/danpottshimself","followers_url":"https://api.github.com/users/danpottshimself/followers","following_url":"https://api.github.com/users/danpottshimself/following{/other_user}","gists_url":"https://api.github.com/users/danpottshimself/gists{/gist_id}","starred_url":"https://api.github.com/users/danpottshimself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpottshimself/subscriptions","organizations_url":"https://api.github.com/users/danpottshimself/orgs","repos_url":"https://api.github.com/users/danpottshimself/repos","events_url":"https://api.github.com/users/danpottshimself/events{/privacy}","received_events_url":"https://api.github.com/users/danpottshimself/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danpottshimself/noughts-and-crosses","description":"Noughts and Crosses game made with angular as a training exercise.","fork":false,"url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses","forks_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/forks","keys_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/teams","hooks_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/hooks","issue_events_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/events{/number}","events_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/events","assignees_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/assignees{/user}","branches_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/branches{/branch}","tags_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/tags","blobs_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/refs{/sha}","trees_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/statuses/{sha}","languages_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/languages","stargazers_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/stargazers","contributors_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/contributors","subscribers_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/subscribers","subscription_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/subscription","commits_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/commits{/sha}","git_commits_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/commits{/sha}","comments_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/comments{/number}","issue_comment_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/comments{/number}","contents_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/contents/{+path}","compare_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/merges","archive_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/downloads","issues_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues{/number}","pulls_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls{/number}","milestones_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/milestones{/number}","notifications_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/labels{/name}","releases_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/releases{/id}","created_at":"2015-09-07T10:57:15Z","updated_at":"2015-09-07T13:09:49Z","pushed_at":"2015-10-19T13:13:21Z","git_url":"git://github.com/danpottshimself/noughts-and-crosses.git","ssh_url":"git@github.com:danpottshimself/noughts-and-crosses.git","clone_url":"https://github.com/danpottshimself/noughts-and-crosses.git","svn_url":"https://github.com/danpottshimself/noughts-and-crosses","homepage":null,"size":9736,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"danpottshimself:master","ref":"master","sha":"37069585dde9a7e21da74ad4cd179233f705e6fc","user":{"login":"danpottshimself","id":13645940,"avatar_url":"https://avatars.githubusercontent.com/u/13645940?v=3","gravatar_id":"","url":"https://api.github.com/users/danpottshimself","html_url":"https://github.com/danpottshimself","followers_url":"https://api.github.com/users/danpottshimself/followers","following_url":"https://api.github.com/users/danpottshimself/following{/other_user}","gists_url":"https://api.github.com/users/danpottshimself/gists{/gist_id}","starred_url":"https://api.github.com/users/danpottshimself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpottshimself/subscriptions","organizations_url":"https://api.github.com/users/danpottshimself/orgs","repos_url":"https://api.github.com/users/danpottshimself/repos","events_url":"https://api.github.com/users/danpottshimself/events{/privacy}","received_events_url":"https://api.github.com/users/danpottshimself/received_events","type":"User","site_admin":false},"repo":{"id":42048006,"name":"noughts-and-crosses","full_name":"danpottshimself/noughts-and-crosses","owner":{"login":"danpottshimself","id":13645940,"avatar_url":"https://avatars.githubusercontent.com/u/13645940?v=3","gravatar_id":"","url":"https://api.github.com/users/danpottshimself","html_url":"https://github.com/danpottshimself","followers_url":"https://api.github.com/users/danpottshimself/followers","following_url":"https://api.github.com/users/danpottshimself/following{/other_user}","gists_url":"https://api.github.com/users/danpottshimself/gists{/gist_id}","starred_url":"https://api.github.com/users/danpottshimself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpottshimself/subscriptions","organizations_url":"https://api.github.com/users/danpottshimself/orgs","repos_url":"https://api.github.com/users/danpottshimself/repos","events_url":"https://api.github.com/users/danpottshimself/events{/privacy}","received_events_url":"https://api.github.com/users/danpottshimself/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danpottshimself/noughts-and-crosses","description":"Noughts and Crosses game made with angular as a training exercise.","fork":false,"url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses","forks_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/forks","keys_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/teams","hooks_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/hooks","issue_events_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/events{/number}","events_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/events","assignees_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/assignees{/user}","branches_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/branches{/branch}","tags_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/tags","blobs_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/refs{/sha}","trees_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/statuses/{sha}","languages_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/languages","stargazers_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/stargazers","contributors_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/contributors","subscribers_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/subscribers","subscription_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/subscription","commits_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/commits{/sha}","git_commits_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/git/commits{/sha}","comments_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/comments{/number}","issue_comment_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/comments{/number}","contents_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/contents/{+path}","compare_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/merges","archive_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/downloads","issues_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues{/number}","pulls_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls{/number}","milestones_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/milestones{/number}","notifications_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/labels{/name}","releases_url":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/releases{/id}","created_at":"2015-09-07T10:57:15Z","updated_at":"2015-09-07T13:09:49Z","pushed_at":"2015-10-19T13:13:21Z","git_url":"git://github.com/danpottshimself/noughts-and-crosses.git","ssh_url":"git@github.com:danpottshimself/noughts-and-crosses.git","clone_url":"https://github.com/danpottshimself/noughts-and-crosses.git","svn_url":"https://github.com/danpottshimself/noughts-and-crosses","homepage":null,"size":9736,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7"},"html":{"href":"https://github.com/danpottshimself/noughts-and-crosses/pull/7"},"issue":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/7"},"comments":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/danpottshimself/noughts-and-crosses/statuses/9f23a399b12e636d3ebc0f8f1fea049319597064"}}}}