{"action":"created","comment":{"url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/comments/62022371","id":62022371,"diff_hunk":"@@ -0,0 +1,56 @@\n+require 'test_helper'\n+\n+class ReferencesControllerTest < ActionController::TestCase\n+  include Devise::TestHelpers\n+\n+  def setup\n+    @thinker = Thinker.create( name: \"Example Thinker\", email: \"thinker@example.com\")\n+    @reference = @thinker.references.create( authors: \"author1\", place_of_publication: \"place\", publisher: \"\", publishing_year: \"1950\", title: \"Great text\")\n+    @request.env[\"devise.mapping\"] = Devise.mappings[:admin]\n+    @user = users(:example_user)\n+    sign_in @user\n+  end\n+\n+  test \"should get index\" do\n+    get :index, :thinker_id => 1\n+    assert_response :success\n+    assert_not_nil assigns(:references)\n+  end\n+\n+  test \"should get new\" do\n+    get :new, :thinker_id => 1\n+    assert_response :success\n+  end\n+\n+  test \"should create reference\" do\n+    assert_difference('Reference.count') do\n+      post :create, thinker_id: @thinker.id, reference: { authors: \"author1\", place_of_publication: \"place\", publisher: \"\", publishing_year: \"1950\", title: \"Great text\" }\n+  end\n+\n+    assert_redirected_to thinker_path(@thinker)\n+  end\n+\n+  test \"should show reference\" do\n+    get :show, id: @reference.id\n+    assert_response :success\n+  end\n+\n+  test \"should get edit\" do\n+    get :edit, id: @reference.id\n+    assert_response :success\n+  end\n+\n+  test \"should update reference\" do","path":"test/controllers/references_controller_test.rb","position":43,"original_position":43,"commit_id":"c1e78350c52cfceeac236a8c557104eb25549646","original_commit_id":"c1e78350c52cfceeac236a8c557104eb25549646","user":{"login":"jbrunton","id":1276413,"avatar_url":"https://avatars.githubusercontent.com/u/1276413?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrunton","html_url":"https://github.com/jbrunton","followers_url":"https://api.github.com/users/jbrunton/followers","following_url":"https://api.github.com/users/jbrunton/following{/other_user}","gists_url":"https://api.github.com/users/jbrunton/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrunton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrunton/subscriptions","organizations_url":"https://api.github.com/users/jbrunton/orgs","repos_url":"https://api.github.com/users/jbrunton/repos","events_url":"https://api.github.com/users/jbrunton/events{/privacy}","received_events_url":"https://api.github.com/users/jbrunton/received_events","type":"User","site_admin":false},"body":"We might add a second test for when validation fails on update.","created_at":"2016-05-04T11:12:52Z","updated_at":"2016-05-04T11:12:52Z","html_url":"https://github.com/Powerglove/Thinkerinnen/pull/50#discussion_r62022371","pull_request_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/comments/62022371"},"html":{"href":"https://github.com/Powerglove/Thinkerinnen/pull/50#discussion_r62022371"},"pull_request":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50","id":68838690,"html_url":"https://github.com/Powerglove/Thinkerinnen/pull/50","diff_url":"https://github.com/Powerglove/Thinkerinnen/pull/50.diff","patch_url":"https://github.com/Powerglove/Thinkerinnen/pull/50.patch","issue_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/50","number":50,"state":"open","locked":false,"title":"Bibliography","user":{"login":"Powerglove","id":11478797,"avatar_url":"https://avatars.githubusercontent.com/u/11478797?v=3","gravatar_id":"","url":"https://api.github.com/users/Powerglove","html_url":"https://github.com/Powerglove","followers_url":"https://api.github.com/users/Powerglove/followers","following_url":"https://api.github.com/users/Powerglove/following{/other_user}","gists_url":"https://api.github.com/users/Powerglove/gists{/gist_id}","starred_url":"https://api.github.com/users/Powerglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Powerglove/subscriptions","organizations_url":"https://api.github.com/users/Powerglove/orgs","repos_url":"https://api.github.com/users/Powerglove/repos","events_url":"https://api.github.com/users/Powerglove/events{/privacy}","received_events_url":"https://api.github.com/users/Powerglove/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-04T10:14:37Z","updated_at":"2016-05-04T11:12:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a8a5aa96ce66f7d63cbef8c9130fb1441de4642","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50/commits","review_comments_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50/comments","review_comment_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/50/comments","statuses_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/statuses/c1e78350c52cfceeac236a8c557104eb25549646","head":{"label":"Powerglove:bibliography","ref":"bibliography","sha":"c1e78350c52cfceeac236a8c557104eb25549646","user":{"login":"Powerglove","id":11478797,"avatar_url":"https://avatars.githubusercontent.com/u/11478797?v=3","gravatar_id":"","url":"https://api.github.com/users/Powerglove","html_url":"https://github.com/Powerglove","followers_url":"https://api.github.com/users/Powerglove/followers","following_url":"https://api.github.com/users/Powerglove/following{/other_user}","gists_url":"https://api.github.com/users/Powerglove/gists{/gist_id}","starred_url":"https://api.github.com/users/Powerglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Powerglove/subscriptions","organizations_url":"https://api.github.com/users/Powerglove/orgs","repos_url":"https://api.github.com/users/Powerglove/repos","events_url":"https://api.github.com/users/Powerglove/events{/privacy}","received_events_url":"https://api.github.com/users/Powerglove/received_events","type":"User","site_admin":false},"repo":{"id":51842964,"name":"Thinkerinnen","full_name":"Powerglove/Thinkerinnen","owner":{"login":"Powerglove","id":11478797,"avatar_url":"https://avatars.githubusercontent.com/u/11478797?v=3","gravatar_id":"","url":"https://api.github.com/users/Powerglove","html_url":"https://github.com/Powerglove","followers_url":"https://api.github.com/users/Powerglove/followers","following_url":"https://api.github.com/users/Powerglove/following{/other_user}","gists_url":"https://api.github.com/users/Powerglove/gists{/gist_id}","starred_url":"https://api.github.com/users/Powerglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Powerglove/subscriptions","organizations_url":"https://api.github.com/users/Powerglove/orgs","repos_url":"https://api.github.com/users/Powerglove/repos","events_url":"https://api.github.com/users/Powerglove/events{/privacy}","received_events_url":"https://api.github.com/users/Powerglove/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Powerglove/Thinkerinnen","description":"A database to find female scientists.","fork":false,"url":"https://api.github.com/repos/Powerglove/Thinkerinnen","forks_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/forks","keys_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/teams","hooks_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/hooks","issue_events_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/events{/number}","events_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/events","assignees_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/assignees{/user}","branches_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/branches{/branch}","tags_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/tags","blobs_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/refs{/sha}","trees_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/statuses/{sha}","languages_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/languages","stargazers_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/stargazers","contributors_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/contributors","subscribers_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/subscribers","subscription_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/subscription","commits_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/commits{/sha}","git_commits_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/commits{/sha}","comments_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/comments{/number}","issue_comment_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/comments{/number}","contents_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/contents/{+path}","compare_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/merges","archive_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/downloads","issues_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues{/number}","pulls_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls{/number}","milestones_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/milestones{/number}","notifications_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/labels{/name}","releases_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/releases{/id}","deployments_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/deployments","created_at":"2016-02-16T14:38:39Z","updated_at":"2016-04-04T19:39:38Z","pushed_at":"2016-05-04T10:14:37Z","git_url":"git://github.com/Powerglove/Thinkerinnen.git","ssh_url":"git@github.com:Powerglove/Thinkerinnen.git","clone_url":"https://github.com/Powerglove/Thinkerinnen.git","svn_url":"https://github.com/Powerglove/Thinkerinnen","homepage":"","size":173,"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":12,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"base":{"label":"Powerglove:master","ref":"master","sha":"488212deb3506e8cb4ce069a74921ba31d7789af","user":{"login":"Powerglove","id":11478797,"avatar_url":"https://avatars.githubusercontent.com/u/11478797?v=3","gravatar_id":"","url":"https://api.github.com/users/Powerglove","html_url":"https://github.com/Powerglove","followers_url":"https://api.github.com/users/Powerglove/followers","following_url":"https://api.github.com/users/Powerglove/following{/other_user}","gists_url":"https://api.github.com/users/Powerglove/gists{/gist_id}","starred_url":"https://api.github.com/users/Powerglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Powerglove/subscriptions","organizations_url":"https://api.github.com/users/Powerglove/orgs","repos_url":"https://api.github.com/users/Powerglove/repos","events_url":"https://api.github.com/users/Powerglove/events{/privacy}","received_events_url":"https://api.github.com/users/Powerglove/received_events","type":"User","site_admin":false},"repo":{"id":51842964,"name":"Thinkerinnen","full_name":"Powerglove/Thinkerinnen","owner":{"login":"Powerglove","id":11478797,"avatar_url":"https://avatars.githubusercontent.com/u/11478797?v=3","gravatar_id":"","url":"https://api.github.com/users/Powerglove","html_url":"https://github.com/Powerglove","followers_url":"https://api.github.com/users/Powerglove/followers","following_url":"https://api.github.com/users/Powerglove/following{/other_user}","gists_url":"https://api.github.com/users/Powerglove/gists{/gist_id}","starred_url":"https://api.github.com/users/Powerglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Powerglove/subscriptions","organizations_url":"https://api.github.com/users/Powerglove/orgs","repos_url":"https://api.github.com/users/Powerglove/repos","events_url":"https://api.github.com/users/Powerglove/events{/privacy}","received_events_url":"https://api.github.com/users/Powerglove/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Powerglove/Thinkerinnen","description":"A database to find female scientists.","fork":false,"url":"https://api.github.com/repos/Powerglove/Thinkerinnen","forks_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/forks","keys_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/teams","hooks_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/hooks","issue_events_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/events{/number}","events_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/events","assignees_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/assignees{/user}","branches_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/branches{/branch}","tags_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/tags","blobs_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/refs{/sha}","trees_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/statuses/{sha}","languages_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/languages","stargazers_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/stargazers","contributors_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/contributors","subscribers_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/subscribers","subscription_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/subscription","commits_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/commits{/sha}","git_commits_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/git/commits{/sha}","comments_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/comments{/number}","issue_comment_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/comments{/number}","contents_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/contents/{+path}","compare_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/merges","archive_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/downloads","issues_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues{/number}","pulls_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls{/number}","milestones_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/milestones{/number}","notifications_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/labels{/name}","releases_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/releases{/id}","deployments_url":"https://api.github.com/repos/Powerglove/Thinkerinnen/deployments","created_at":"2016-02-16T14:38:39Z","updated_at":"2016-04-04T19:39:38Z","pushed_at":"2016-05-04T10:14:37Z","git_url":"git://github.com/Powerglove/Thinkerinnen.git","ssh_url":"git@github.com:Powerglove/Thinkerinnen.git","clone_url":"https://github.com/Powerglove/Thinkerinnen.git","svn_url":"https://github.com/Powerglove/Thinkerinnen","homepage":"","size":173,"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":12,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50"},"html":{"href":"https://github.com/Powerglove/Thinkerinnen/pull/50"},"issue":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/50"},"comments":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/Powerglove/Thinkerinnen/statuses/c1e78350c52cfceeac236a8c557104eb25549646"}}}}