{"action":"created","comment":{"url":"https://api.github.com/repos/CjMoore/horses/pulls/comments/98376596","pull_request_review_id":19014656,"id":98376596,"diff_hunk":"@@ -0,0 +1,24 @@\n+require_relative '../spec_helper'\n+\n+describe \"When user fills out form and clicks submit\" do\n+  it \"the database adds a new horse\" do\n+    Breed.create(name: \"Palimino\")\n+    Jockey.create(name: \"Adolf\")\n+\n+    visit('/horses/new')\n+\n+    fill_in('horse[name]', :with=>\"Dufus\")\n+    fill_in('horse[total_winnings]', :with =>3)\n+    select('Adolf', from: \"horse[jockey_id]\")\n+    select('Palimino', from: \"horse[breed_id]\")\n+\n+    click_button(\"Create New Horse\")\n+    horse = Horse.find(1)\n+\n+    expect(horse).to be_valid\n+    expect(horse.name).to eq(\"Dufus\")\n+    expect(horse.total_winnings).to eq(3)\n+    expect(horse.jockey.name).to eq(\"Adolf\")\n+    expect(horse.breed.name).to eq(\"Palimino\")","path":"spec/features/user_can_add_new_horse_spec.rb","position":22,"original_position":22,"commit_id":"f0fa4cd21583ecc12244ae549de4baed64df976a","original_commit_id":"f0fa4cd21583ecc12244ae549de4baed64df976a","user":{"login":"s-espinosa","id":10855116,"avatar_url":"https://avatars.githubusercontent.com/u/10855116?v=3","gravatar_id":"","url":"https://api.github.com/users/s-espinosa","html_url":"https://github.com/s-espinosa","followers_url":"https://api.github.com/users/s-espinosa/followers","following_url":"https://api.github.com/users/s-espinosa/following{/other_user}","gists_url":"https://api.github.com/users/s-espinosa/gists{/gist_id}","starred_url":"https://api.github.com/users/s-espinosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-espinosa/subscriptions","organizations_url":"https://api.github.com/users/s-espinosa/orgs","repos_url":"https://api.github.com/users/s-espinosa/repos","events_url":"https://api.github.com/users/s-espinosa/events{/privacy}","received_events_url":"https://api.github.com/users/s-espinosa/received_events","type":"User","site_admin":false},"body":"Recommend that you use feature tests to test for user interaction. I think I was a little more ambivalent on this in class, and can still see some use for a limited check that our horse was persisted to the database, but recommend that the primary check here be that the page you're redirected to has the horse information on it that you would expect (e.g. `expect(page).to have_content(\"Dufus\")`, etc.).  Let me know if that makes sense.","created_at":"2017-01-30T03:37:16Z","updated_at":"2017-01-30T03:45:12Z","html_url":"https://github.com/CjMoore/horses/pull/1#discussion_r98376596","pull_request_url":"https://api.github.com/repos/CjMoore/horses/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/CjMoore/horses/pulls/comments/98376596"},"html":{"href":"https://github.com/CjMoore/horses/pull/1#discussion_r98376596"},"pull_request":{"href":"https://api.github.com/repos/CjMoore/horses/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/CjMoore/horses/pulls/1","id":103670651,"html_url":"https://github.com/CjMoore/horses/pull/1","diff_url":"https://github.com/CjMoore/horses/pull/1.diff","patch_url":"https://github.com/CjMoore/horses/pull/1.patch","issue_url":"https://api.github.com/repos/CjMoore/horses/issues/1","number":1,"state":"open","locked":false,"title":"Wrote feature tests for index new and edit horse","user":{"login":"CjMoore","id":22529806,"avatar_url":"https://avatars.githubusercontent.com/u/22529806?v=3","gravatar_id":"","url":"https://api.github.com/users/CjMoore","html_url":"https://github.com/CjMoore","followers_url":"https://api.github.com/users/CjMoore/followers","following_url":"https://api.github.com/users/CjMoore/following{/other_user}","gists_url":"https://api.github.com/users/CjMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/CjMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CjMoore/subscriptions","organizations_url":"https://api.github.com/users/CjMoore/orgs","repos_url":"https://api.github.com/users/CjMoore/repos","events_url":"https://api.github.com/users/CjMoore/events{/privacy}","received_events_url":"https://api.github.com/users/CjMoore/received_events","type":"User","site_admin":false},"body":"Horse feature test homework\r\n\r\n@s-espinosa @carmer","created_at":"2017-01-30T01:49:13Z","updated_at":"2017-01-30T03:45:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e169c42d9151868a3e604c3233fd3291f42ee4c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CjMoore/horses/pulls/1/commits","review_comments_url":"https://api.github.com/repos/CjMoore/horses/pulls/1/comments","review_comment_url":"https://api.github.com/repos/CjMoore/horses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CjMoore/horses/issues/1/comments","statuses_url":"https://api.github.com/repos/CjMoore/horses/statuses/f0fa4cd21583ecc12244ae549de4baed64df976a","head":{"label":"CjMoore:adding_feature_tests","ref":"adding_feature_tests","sha":"f0fa4cd21583ecc12244ae549de4baed64df976a","user":{"login":"CjMoore","id":22529806,"avatar_url":"https://avatars.githubusercontent.com/u/22529806?v=3","gravatar_id":"","url":"https://api.github.com/users/CjMoore","html_url":"https://github.com/CjMoore","followers_url":"https://api.github.com/users/CjMoore/followers","following_url":"https://api.github.com/users/CjMoore/following{/other_user}","gists_url":"https://api.github.com/users/CjMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/CjMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CjMoore/subscriptions","organizations_url":"https://api.github.com/users/CjMoore/orgs","repos_url":"https://api.github.com/users/CjMoore/repos","events_url":"https://api.github.com/users/CjMoore/events{/privacy}","received_events_url":"https://api.github.com/users/CjMoore/received_events","type":"User","site_admin":false},"repo":{"id":80383492,"name":"horses","full_name":"CjMoore/horses","owner":{"login":"CjMoore","id":22529806,"avatar_url":"https://avatars.githubusercontent.com/u/22529806?v=3","gravatar_id":"","url":"https://api.github.com/users/CjMoore","html_url":"https://github.com/CjMoore","followers_url":"https://api.github.com/users/CjMoore/followers","following_url":"https://api.github.com/users/CjMoore/following{/other_user}","gists_url":"https://api.github.com/users/CjMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/CjMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CjMoore/subscriptions","organizations_url":"https://api.github.com/users/CjMoore/orgs","repos_url":"https://api.github.com/users/CjMoore/repos","events_url":"https://api.github.com/users/CjMoore/events{/privacy}","received_events_url":"https://api.github.com/users/CjMoore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CjMoore/horses","description":null,"fork":false,"url":"https://api.github.com/repos/CjMoore/horses","forks_url":"https://api.github.com/repos/CjMoore/horses/forks","keys_url":"https://api.github.com/repos/CjMoore/horses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CjMoore/horses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CjMoore/horses/teams","hooks_url":"https://api.github.com/repos/CjMoore/horses/hooks","issue_events_url":"https://api.github.com/repos/CjMoore/horses/issues/events{/number}","events_url":"https://api.github.com/repos/CjMoore/horses/events","assignees_url":"https://api.github.com/repos/CjMoore/horses/assignees{/user}","branches_url":"https://api.github.com/repos/CjMoore/horses/branches{/branch}","tags_url":"https://api.github.com/repos/CjMoore/horses/tags","blobs_url":"https://api.github.com/repos/CjMoore/horses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CjMoore/horses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CjMoore/horses/git/refs{/sha}","trees_url":"https://api.github.com/repos/CjMoore/horses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CjMoore/horses/statuses/{sha}","languages_url":"https://api.github.com/repos/CjMoore/horses/languages","stargazers_url":"https://api.github.com/repos/CjMoore/horses/stargazers","contributors_url":"https://api.github.com/repos/CjMoore/horses/contributors","subscribers_url":"https://api.github.com/repos/CjMoore/horses/subscribers","subscription_url":"https://api.github.com/repos/CjMoore/horses/subscription","commits_url":"https://api.github.com/repos/CjMoore/horses/commits{/sha}","git_commits_url":"https://api.github.com/repos/CjMoore/horses/git/commits{/sha}","comments_url":"https://api.github.com/repos/CjMoore/horses/comments{/number}","issue_comment_url":"https://api.github.com/repos/CjMoore/horses/issues/comments{/number}","contents_url":"https://api.github.com/repos/CjMoore/horses/contents/{+path}","compare_url":"https://api.github.com/repos/CjMoore/horses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CjMoore/horses/merges","archive_url":"https://api.github.com/repos/CjMoore/horses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CjMoore/horses/downloads","issues_url":"https://api.github.com/repos/CjMoore/horses/issues{/number}","pulls_url":"https://api.github.com/repos/CjMoore/horses/pulls{/number}","milestones_url":"https://api.github.com/repos/CjMoore/horses/milestones{/number}","notifications_url":"https://api.github.com/repos/CjMoore/horses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CjMoore/horses/labels{/name}","releases_url":"https://api.github.com/repos/CjMoore/horses/releases{/id}","deployments_url":"https://api.github.com/repos/CjMoore/horses/deployments","created_at":"2017-01-30T00:41:05Z","updated_at":"2017-01-30T00:41:05Z","pushed_at":"2017-01-30T01:49:13Z","git_url":"git://github.com/CjMoore/horses.git","ssh_url":"git@github.com:CjMoore/horses.git","clone_url":"https://github.com/CjMoore/horses.git","svn_url":"https://github.com/CjMoore/horses","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"crud_complete"}},"base":{"label":"CjMoore:crud_complete","ref":"crud_complete","sha":"ef9ecd51aa6a7739907d930b43940e9e072da97b","user":{"login":"CjMoore","id":22529806,"avatar_url":"https://avatars.githubusercontent.com/u/22529806?v=3","gravatar_id":"","url":"https://api.github.com/users/CjMoore","html_url":"https://github.com/CjMoore","followers_url":"https://api.github.com/users/CjMoore/followers","following_url":"https://api.github.com/users/CjMoore/following{/other_user}","gists_url":"https://api.github.com/users/CjMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/CjMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CjMoore/subscriptions","organizations_url":"https://api.github.com/users/CjMoore/orgs","repos_url":"https://api.github.com/users/CjMoore/repos","events_url":"https://api.github.com/users/CjMoore/events{/privacy}","received_events_url":"https://api.github.com/users/CjMoore/received_events","type":"User","site_admin":false},"repo":{"id":80383492,"name":"horses","full_name":"CjMoore/horses","owner":{"login":"CjMoore","id":22529806,"avatar_url":"https://avatars.githubusercontent.com/u/22529806?v=3","gravatar_id":"","url":"https://api.github.com/users/CjMoore","html_url":"https://github.com/CjMoore","followers_url":"https://api.github.com/users/CjMoore/followers","following_url":"https://api.github.com/users/CjMoore/following{/other_user}","gists_url":"https://api.github.com/users/CjMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/CjMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CjMoore/subscriptions","organizations_url":"https://api.github.com/users/CjMoore/orgs","repos_url":"https://api.github.com/users/CjMoore/repos","events_url":"https://api.github.com/users/CjMoore/events{/privacy}","received_events_url":"https://api.github.com/users/CjMoore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CjMoore/horses","description":null,"fork":false,"url":"https://api.github.com/repos/CjMoore/horses","forks_url":"https://api.github.com/repos/CjMoore/horses/forks","keys_url":"https://api.github.com/repos/CjMoore/horses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CjMoore/horses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CjMoore/horses/teams","hooks_url":"https://api.github.com/repos/CjMoore/horses/hooks","issue_events_url":"https://api.github.com/repos/CjMoore/horses/issues/events{/number}","events_url":"https://api.github.com/repos/CjMoore/horses/events","assignees_url":"https://api.github.com/repos/CjMoore/horses/assignees{/user}","branches_url":"https://api.github.com/repos/CjMoore/horses/branches{/branch}","tags_url":"https://api.github.com/repos/CjMoore/horses/tags","blobs_url":"https://api.github.com/repos/CjMoore/horses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CjMoore/horses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CjMoore/horses/git/refs{/sha}","trees_url":"https://api.github.com/repos/CjMoore/horses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CjMoore/horses/statuses/{sha}","languages_url":"https://api.github.com/repos/CjMoore/horses/languages","stargazers_url":"https://api.github.com/repos/CjMoore/horses/stargazers","contributors_url":"https://api.github.com/repos/CjMoore/horses/contributors","subscribers_url":"https://api.github.com/repos/CjMoore/horses/subscribers","subscription_url":"https://api.github.com/repos/CjMoore/horses/subscription","commits_url":"https://api.github.com/repos/CjMoore/horses/commits{/sha}","git_commits_url":"https://api.github.com/repos/CjMoore/horses/git/commits{/sha}","comments_url":"https://api.github.com/repos/CjMoore/horses/comments{/number}","issue_comment_url":"https://api.github.com/repos/CjMoore/horses/issues/comments{/number}","contents_url":"https://api.github.com/repos/CjMoore/horses/contents/{+path}","compare_url":"https://api.github.com/repos/CjMoore/horses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CjMoore/horses/merges","archive_url":"https://api.github.com/repos/CjMoore/horses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CjMoore/horses/downloads","issues_url":"https://api.github.com/repos/CjMoore/horses/issues{/number}","pulls_url":"https://api.github.com/repos/CjMoore/horses/pulls{/number}","milestones_url":"https://api.github.com/repos/CjMoore/horses/milestones{/number}","notifications_url":"https://api.github.com/repos/CjMoore/horses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CjMoore/horses/labels{/name}","releases_url":"https://api.github.com/repos/CjMoore/horses/releases{/id}","deployments_url":"https://api.github.com/repos/CjMoore/horses/deployments","created_at":"2017-01-30T00:41:05Z","updated_at":"2017-01-30T00:41:05Z","pushed_at":"2017-01-30T01:49:13Z","git_url":"git://github.com/CjMoore/horses.git","ssh_url":"git@github.com:CjMoore/horses.git","clone_url":"https://github.com/CjMoore/horses.git","svn_url":"https://github.com/CjMoore/horses","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"crud_complete"}},"_links":{"self":{"href":"https://api.github.com/repos/CjMoore/horses/pulls/1"},"html":{"href":"https://github.com/CjMoore/horses/pull/1"},"issue":{"href":"https://api.github.com/repos/CjMoore/horses/issues/1"},"comments":{"href":"https://api.github.com/repos/CjMoore/horses/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/CjMoore/horses/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/CjMoore/horses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CjMoore/horses/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/CjMoore/horses/statuses/f0fa4cd21583ecc12244ae549de4baed64df976a"}}}}
{"actor":{"display_login":"s-espinosa"}}