{"action":"created","comment":{"url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/comments/38248569","id":38248569,"diff_hunk":"@@ -1,7 +1,61 @@\n require 'test_helper'\n \n class PawnTest < ActiveSupport::TestCase\n-  # test \"the truth\" do\n-  #   assert true\n-  # end\n+  # General Pawn tests\n+  test \"Pawn can't move horizontally\" do\n+    assert_not Pawn.new(x_position: 4, y_position: 4).valid_move?(5, 4)\n+  end\n+\n+  # White Pawn tests\n+  test 'white moves up one' do\n+    assert Pawn.new(color: \"white\", x_position: 4, y_position: 2).valid_move?(4, 3)\n+  end\n+\n+  test 'white moves up two on first move' do\n+    assert Pawn.new(color: \"white\", x_position: 4, y_position: 1).valid_move?(4, 3)\n+  end\n+\n+  test 'white can not normally move diagonally' do\n+    assert_not Pawn.new(color: \"white\", x_position: 4, y_position: 4).valid_move?(5, 5)\n+  end\n+\n+  test 'white can not go up more than two places' do\n+    assert_not Pawn.new(color: \"white\", x_position: 4, y_position: 4).valid_move?(5, 8)\n+  end\n+\n+  test \"white can not move backwards\" do\n+    assert_not Pawn.new(color: \"white\", x_position: 4, y_position: 4).valid_move?(4, 3)\n+  end\n+\n+  test \"white can capture upwards diagonally if enemy piece present\" do\n+    Piece.new(color: \"black\", x_position: 5, y_position: 3)\n+    assert Pawn.new(color: \"white\", x_position: 4, y_position: 2).valid_move?(5, 3)\n+  end\n+\n+  # Black Pawn tests\n+  test 'black moves down one' do\n+    assert Pawn.new(color: \"black\", x_position: 4, y_position: 6).valid_move?(4, 5)\n+  end\n+\n+  test 'black moves down two on first move' do","path":"test/models/pawn_test.rb","position":43,"original_position":43,"commit_id":"5f3ddc04789225c8e60d12bb768a2031dd1bcbef","original_commit_id":"5f3ddc04789225c8e60d12bb768a2031dd1bcbef","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-08-28T21:58:10Z","updated_at":"2015-08-28T21:58:10Z","html_url":"https://github.com/foolsmatechess/fools_mate_chess/pull/17#discussion_r38248569","pull_request_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/comments/38248569"},"html":{"href":"https://github.com/foolsmatechess/fools_mate_chess/pull/17#discussion_r38248569"},"pull_request":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17","id":43676335,"html_url":"https://github.com/foolsmatechess/fools_mate_chess/pull/17","diff_url":"https://github.com/foolsmatechess/fools_mate_chess/pull/17.diff","patch_url":"https://github.com/foolsmatechess/fools_mate_chess/pull/17.patch","issue_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/17","number":17,"state":"open","locked":false,"title":"Pawn valid move","user":{"login":"NiVanc","id":3155535,"avatar_url":"https://avatars.githubusercontent.com/u/3155535?v=3","gravatar_id":"","url":"https://api.github.com/users/NiVanc","html_url":"https://github.com/NiVanc","followers_url":"https://api.github.com/users/NiVanc/followers","following_url":"https://api.github.com/users/NiVanc/following{/other_user}","gists_url":"https://api.github.com/users/NiVanc/gists{/gist_id}","starred_url":"https://api.github.com/users/NiVanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NiVanc/subscriptions","organizations_url":"https://api.github.com/users/NiVanc/orgs","repos_url":"https://api.github.com/users/NiVanc/repos","events_url":"https://api.github.com/users/NiVanc/events{/privacy}","received_events_url":"https://api.github.com/users/NiVanc/received_events","type":"User","site_admin":false},"body":"Logic for valid_move? for the pawn piece.\r\nMethod to detect if enemy piece is present still needs to be completed","created_at":"2015-08-28T21:58:06Z","updated_at":"2015-08-28T21:58:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d564a1d1253b74d85c132923419a4876cf49cede","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17/commits","review_comments_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17/comments","review_comment_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/comments{/number}","comments_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/17/comments","statuses_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/statuses/5f3ddc04789225c8e60d12bb768a2031dd1bcbef","head":{"label":"foolsmatechess:pawn_valid_move","ref":"pawn_valid_move","sha":"5f3ddc04789225c8e60d12bb768a2031dd1bcbef","user":{"login":"foolsmatechess","id":13500112,"avatar_url":"https://avatars.githubusercontent.com/u/13500112?v=3","gravatar_id":"","url":"https://api.github.com/users/foolsmatechess","html_url":"https://github.com/foolsmatechess","followers_url":"https://api.github.com/users/foolsmatechess/followers","following_url":"https://api.github.com/users/foolsmatechess/following{/other_user}","gists_url":"https://api.github.com/users/foolsmatechess/gists{/gist_id}","starred_url":"https://api.github.com/users/foolsmatechess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foolsmatechess/subscriptions","organizations_url":"https://api.github.com/users/foolsmatechess/orgs","repos_url":"https://api.github.com/users/foolsmatechess/repos","events_url":"https://api.github.com/users/foolsmatechess/events{/privacy}","received_events_url":"https://api.github.com/users/foolsmatechess/received_events","type":"Organization","site_admin":false},"repo":{"id":39698887,"name":"fools_mate_chess","full_name":"foolsmatechess/fools_mate_chess","owner":{"login":"foolsmatechess","id":13500112,"avatar_url":"https://avatars.githubusercontent.com/u/13500112?v=3","gravatar_id":"","url":"https://api.github.com/users/foolsmatechess","html_url":"https://github.com/foolsmatechess","followers_url":"https://api.github.com/users/foolsmatechess/followers","following_url":"https://api.github.com/users/foolsmatechess/following{/other_user}","gists_url":"https://api.github.com/users/foolsmatechess/gists{/gist_id}","starred_url":"https://api.github.com/users/foolsmatechess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foolsmatechess/subscriptions","organizations_url":"https://api.github.com/users/foolsmatechess/orgs","repos_url":"https://api.github.com/users/foolsmatechess/repos","events_url":"https://api.github.com/users/foolsmatechess/events{/privacy}","received_events_url":"https://api.github.com/users/foolsmatechess/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/foolsmatechess/fools_mate_chess","description":"","fork":false,"url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess","forks_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/forks","keys_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/teams","hooks_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/hooks","issue_events_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/events{/number}","events_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/events","assignees_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/assignees{/user}","branches_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/branches{/branch}","tags_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/tags","blobs_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/statuses/{sha}","languages_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/languages","stargazers_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/stargazers","contributors_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/contributors","subscribers_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/subscribers","subscription_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/subscription","commits_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/comments{/number}","contents_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/contents/{+path}","compare_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/merges","archive_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/downloads","issues_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues{/number}","pulls_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls{/number}","milestones_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/milestones{/number}","notifications_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/labels{/name}","releases_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/releases{/id}","created_at":"2015-07-25T19:02:20Z","updated_at":"2015-07-25T21:19:03Z","pushed_at":"2015-08-28T21:58:06Z","git_url":"git://github.com/foolsmatechess/fools_mate_chess.git","ssh_url":"git@github.com:foolsmatechess/fools_mate_chess.git","clone_url":"https://github.com/foolsmatechess/fools_mate_chess.git","svn_url":"https://github.com/foolsmatechess/fools_mate_chess","homepage":"https://foolsmate.herokuapp.com/","size":456,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"foolsmatechess:master","ref":"master","sha":"01fa9871c7af51cf4a20729b8ac4da8f22fedeb0","user":{"login":"foolsmatechess","id":13500112,"avatar_url":"https://avatars.githubusercontent.com/u/13500112?v=3","gravatar_id":"","url":"https://api.github.com/users/foolsmatechess","html_url":"https://github.com/foolsmatechess","followers_url":"https://api.github.com/users/foolsmatechess/followers","following_url":"https://api.github.com/users/foolsmatechess/following{/other_user}","gists_url":"https://api.github.com/users/foolsmatechess/gists{/gist_id}","starred_url":"https://api.github.com/users/foolsmatechess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foolsmatechess/subscriptions","organizations_url":"https://api.github.com/users/foolsmatechess/orgs","repos_url":"https://api.github.com/users/foolsmatechess/repos","events_url":"https://api.github.com/users/foolsmatechess/events{/privacy}","received_events_url":"https://api.github.com/users/foolsmatechess/received_events","type":"Organization","site_admin":false},"repo":{"id":39698887,"name":"fools_mate_chess","full_name":"foolsmatechess/fools_mate_chess","owner":{"login":"foolsmatechess","id":13500112,"avatar_url":"https://avatars.githubusercontent.com/u/13500112?v=3","gravatar_id":"","url":"https://api.github.com/users/foolsmatechess","html_url":"https://github.com/foolsmatechess","followers_url":"https://api.github.com/users/foolsmatechess/followers","following_url":"https://api.github.com/users/foolsmatechess/following{/other_user}","gists_url":"https://api.github.com/users/foolsmatechess/gists{/gist_id}","starred_url":"https://api.github.com/users/foolsmatechess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foolsmatechess/subscriptions","organizations_url":"https://api.github.com/users/foolsmatechess/orgs","repos_url":"https://api.github.com/users/foolsmatechess/repos","events_url":"https://api.github.com/users/foolsmatechess/events{/privacy}","received_events_url":"https://api.github.com/users/foolsmatechess/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/foolsmatechess/fools_mate_chess","description":"","fork":false,"url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess","forks_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/forks","keys_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/teams","hooks_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/hooks","issue_events_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/events{/number}","events_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/events","assignees_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/assignees{/user}","branches_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/branches{/branch}","tags_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/tags","blobs_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/statuses/{sha}","languages_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/languages","stargazers_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/stargazers","contributors_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/contributors","subscribers_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/subscribers","subscription_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/subscription","commits_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/comments{/number}","contents_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/contents/{+path}","compare_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/merges","archive_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/downloads","issues_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues{/number}","pulls_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls{/number}","milestones_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/milestones{/number}","notifications_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/labels{/name}","releases_url":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/releases{/id}","created_at":"2015-07-25T19:02:20Z","updated_at":"2015-07-25T21:19:03Z","pushed_at":"2015-08-28T21:58:06Z","git_url":"git://github.com/foolsmatechess/fools_mate_chess.git","ssh_url":"git@github.com:foolsmatechess/fools_mate_chess.git","clone_url":"https://github.com/foolsmatechess/fools_mate_chess.git","svn_url":"https://github.com/foolsmatechess/fools_mate_chess","homepage":"https://foolsmate.herokuapp.com/","size":456,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17"},"html":{"href":"https://github.com/foolsmatechess/fools_mate_chess/pull/17"},"issue":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/17"},"comments":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/foolsmatechess/fools_mate_chess/statuses/5f3ddc04789225c8e60d12bb768a2031dd1bcbef"}}}}