{"action":"created","comment":{"url":"https://api.github.com/repos/s-anches/qna/pulls/comments/46654420","id":46654420,"diff_hunk":"@@ -8,6 +8,49 @@\n   it { should belong_to :user }\n   it { should have_many(:answers).dependent(:destroy) }\n   it { should have_many(:attachments).dependent(:destroy) }\n+  it { should have_many(:votes).dependent(:destroy) }\n \n   it { should accept_nested_attributes_for :attachments }\n+  it { should accept_nested_attributes_for :votes }\n+\n+  let(:user) { create :user }\n+  let(:question) { create :question }\n+\n+  describe 'vote and unvote method' do","path":"spec/models/question_spec.rb","position":12,"original_position":12,"commit_id":"95b643051997489693bdfc3e870531c330584101","original_commit_id":"95b643051997489693bdfc3e870531c330584101","user":{"login":"palkan","id":1516722,"avatar_url":"https://avatars.githubusercontent.com/u/1516722?v=3","gravatar_id":"","url":"https://api.github.com/users/palkan","html_url":"https://github.com/palkan","followers_url":"https://api.github.com/users/palkan/followers","following_url":"https://api.github.com/users/palkan/following{/other_user}","gists_url":"https://api.github.com/users/palkan/gists{/gist_id}","starred_url":"https://api.github.com/users/palkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palkan/subscriptions","organizations_url":"https://api.github.com/users/palkan/orgs","repos_url":"https://api.github.com/users/palkan/repos","events_url":"https://api.github.com/users/palkan/events{/privacy}","received_events_url":"https://api.github.com/users/palkan/received_events","type":"User","site_admin":false},"body":"Аналогичные тесты должны быть и для модели Answer.","created_at":"2015-12-04T07:06:01Z","updated_at":"2015-12-04T07:06:01Z","html_url":"https://github.com/s-anches/qna/pull/7#discussion_r46654420","pull_request_url":"https://api.github.com/repos/s-anches/qna/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/s-anches/qna/pulls/comments/46654420"},"html":{"href":"https://github.com/s-anches/qna/pull/7#discussion_r46654420"},"pull_request":{"href":"https://api.github.com/repos/s-anches/qna/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/s-anches/qna/pulls/7","id":52580692,"html_url":"https://github.com/s-anches/qna/pull/7","diff_url":"https://github.com/s-anches/qna/pull/7.diff","patch_url":"https://github.com/s-anches/qna/pull/7.patch","issue_url":"https://api.github.com/repos/s-anches/qna/issues/7","number":7,"state":"open","locked":false,"title":"Lesson9","user":{"login":"s-anches","id":197649,"avatar_url":"https://avatars.githubusercontent.com/u/197649?v=3","gravatar_id":"","url":"https://api.github.com/users/s-anches","html_url":"https://github.com/s-anches","followers_url":"https://api.github.com/users/s-anches/followers","following_url":"https://api.github.com/users/s-anches/following{/other_user}","gists_url":"https://api.github.com/users/s-anches/gists{/gist_id}","starred_url":"https://api.github.com/users/s-anches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-anches/subscriptions","organizations_url":"https://api.github.com/users/s-anches/orgs","repos_url":"https://api.github.com/users/s-anches/repos","events_url":"https://api.github.com/users/s-anches/events{/privacy}","received_events_url":"https://api.github.com/users/s-anches/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-03T19:32:45Z","updated_at":"2015-12-04T07:06:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80eee67325e6240551895314551df2c66f328455","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/s-anches/qna/pulls/7/commits","review_comments_url":"https://api.github.com/repos/s-anches/qna/pulls/7/comments","review_comment_url":"https://api.github.com/repos/s-anches/qna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/s-anches/qna/issues/7/comments","statuses_url":"https://api.github.com/repos/s-anches/qna/statuses/95b643051997489693bdfc3e870531c330584101","head":{"label":"s-anches:lesson9","ref":"lesson9","sha":"95b643051997489693bdfc3e870531c330584101","user":{"login":"s-anches","id":197649,"avatar_url":"https://avatars.githubusercontent.com/u/197649?v=3","gravatar_id":"","url":"https://api.github.com/users/s-anches","html_url":"https://github.com/s-anches","followers_url":"https://api.github.com/users/s-anches/followers","following_url":"https://api.github.com/users/s-anches/following{/other_user}","gists_url":"https://api.github.com/users/s-anches/gists{/gist_id}","starred_url":"https://api.github.com/users/s-anches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-anches/subscriptions","organizations_url":"https://api.github.com/users/s-anches/orgs","repos_url":"https://api.github.com/users/s-anches/repos","events_url":"https://api.github.com/users/s-anches/events{/privacy}","received_events_url":"https://api.github.com/users/s-anches/received_events","type":"User","site_admin":false},"repo":{"id":45778434,"name":"qna","full_name":"s-anches/qna","owner":{"login":"s-anches","id":197649,"avatar_url":"https://avatars.githubusercontent.com/u/197649?v=3","gravatar_id":"","url":"https://api.github.com/users/s-anches","html_url":"https://github.com/s-anches","followers_url":"https://api.github.com/users/s-anches/followers","following_url":"https://api.github.com/users/s-anches/following{/other_user}","gists_url":"https://api.github.com/users/s-anches/gists{/gist_id}","starred_url":"https://api.github.com/users/s-anches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-anches/subscriptions","organizations_url":"https://api.github.com/users/s-anches/orgs","repos_url":"https://api.github.com/users/s-anches/repos","events_url":"https://api.github.com/users/s-anches/events{/privacy}","received_events_url":"https://api.github.com/users/s-anches/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s-anches/qna","description":"Question & Answer","fork":false,"url":"https://api.github.com/repos/s-anches/qna","forks_url":"https://api.github.com/repos/s-anches/qna/forks","keys_url":"https://api.github.com/repos/s-anches/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s-anches/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s-anches/qna/teams","hooks_url":"https://api.github.com/repos/s-anches/qna/hooks","issue_events_url":"https://api.github.com/repos/s-anches/qna/issues/events{/number}","events_url":"https://api.github.com/repos/s-anches/qna/events","assignees_url":"https://api.github.com/repos/s-anches/qna/assignees{/user}","branches_url":"https://api.github.com/repos/s-anches/qna/branches{/branch}","tags_url":"https://api.github.com/repos/s-anches/qna/tags","blobs_url":"https://api.github.com/repos/s-anches/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s-anches/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s-anches/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/s-anches/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s-anches/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/s-anches/qna/languages","stargazers_url":"https://api.github.com/repos/s-anches/qna/stargazers","contributors_url":"https://api.github.com/repos/s-anches/qna/contributors","subscribers_url":"https://api.github.com/repos/s-anches/qna/subscribers","subscription_url":"https://api.github.com/repos/s-anches/qna/subscription","commits_url":"https://api.github.com/repos/s-anches/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/s-anches/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/s-anches/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/s-anches/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/s-anches/qna/contents/{+path}","compare_url":"https://api.github.com/repos/s-anches/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s-anches/qna/merges","archive_url":"https://api.github.com/repos/s-anches/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s-anches/qna/downloads","issues_url":"https://api.github.com/repos/s-anches/qna/issues{/number}","pulls_url":"https://api.github.com/repos/s-anches/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/s-anches/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/s-anches/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s-anches/qna/labels{/name}","releases_url":"https://api.github.com/repos/s-anches/qna/releases{/id}","created_at":"2015-11-08T11:54:31Z","updated_at":"2015-11-08T12:11:12Z","pushed_at":"2015-12-03T19:32:46Z","git_url":"git://github.com/s-anches/qna.git","ssh_url":"git@github.com:s-anches/qna.git","clone_url":"https://github.com/s-anches/qna.git","svn_url":"https://github.com/s-anches/qna","homepage":null,"size":147,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"s-anches:master","ref":"master","sha":"313dc1acd1b7674473735d3316db224a0f4832f8","user":{"login":"s-anches","id":197649,"avatar_url":"https://avatars.githubusercontent.com/u/197649?v=3","gravatar_id":"","url":"https://api.github.com/users/s-anches","html_url":"https://github.com/s-anches","followers_url":"https://api.github.com/users/s-anches/followers","following_url":"https://api.github.com/users/s-anches/following{/other_user}","gists_url":"https://api.github.com/users/s-anches/gists{/gist_id}","starred_url":"https://api.github.com/users/s-anches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-anches/subscriptions","organizations_url":"https://api.github.com/users/s-anches/orgs","repos_url":"https://api.github.com/users/s-anches/repos","events_url":"https://api.github.com/users/s-anches/events{/privacy}","received_events_url":"https://api.github.com/users/s-anches/received_events","type":"User","site_admin":false},"repo":{"id":45778434,"name":"qna","full_name":"s-anches/qna","owner":{"login":"s-anches","id":197649,"avatar_url":"https://avatars.githubusercontent.com/u/197649?v=3","gravatar_id":"","url":"https://api.github.com/users/s-anches","html_url":"https://github.com/s-anches","followers_url":"https://api.github.com/users/s-anches/followers","following_url":"https://api.github.com/users/s-anches/following{/other_user}","gists_url":"https://api.github.com/users/s-anches/gists{/gist_id}","starred_url":"https://api.github.com/users/s-anches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-anches/subscriptions","organizations_url":"https://api.github.com/users/s-anches/orgs","repos_url":"https://api.github.com/users/s-anches/repos","events_url":"https://api.github.com/users/s-anches/events{/privacy}","received_events_url":"https://api.github.com/users/s-anches/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s-anches/qna","description":"Question & Answer","fork":false,"url":"https://api.github.com/repos/s-anches/qna","forks_url":"https://api.github.com/repos/s-anches/qna/forks","keys_url":"https://api.github.com/repos/s-anches/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s-anches/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s-anches/qna/teams","hooks_url":"https://api.github.com/repos/s-anches/qna/hooks","issue_events_url":"https://api.github.com/repos/s-anches/qna/issues/events{/number}","events_url":"https://api.github.com/repos/s-anches/qna/events","assignees_url":"https://api.github.com/repos/s-anches/qna/assignees{/user}","branches_url":"https://api.github.com/repos/s-anches/qna/branches{/branch}","tags_url":"https://api.github.com/repos/s-anches/qna/tags","blobs_url":"https://api.github.com/repos/s-anches/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s-anches/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s-anches/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/s-anches/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s-anches/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/s-anches/qna/languages","stargazers_url":"https://api.github.com/repos/s-anches/qna/stargazers","contributors_url":"https://api.github.com/repos/s-anches/qna/contributors","subscribers_url":"https://api.github.com/repos/s-anches/qna/subscribers","subscription_url":"https://api.github.com/repos/s-anches/qna/subscription","commits_url":"https://api.github.com/repos/s-anches/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/s-anches/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/s-anches/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/s-anches/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/s-anches/qna/contents/{+path}","compare_url":"https://api.github.com/repos/s-anches/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s-anches/qna/merges","archive_url":"https://api.github.com/repos/s-anches/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s-anches/qna/downloads","issues_url":"https://api.github.com/repos/s-anches/qna/issues{/number}","pulls_url":"https://api.github.com/repos/s-anches/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/s-anches/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/s-anches/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s-anches/qna/labels{/name}","releases_url":"https://api.github.com/repos/s-anches/qna/releases{/id}","created_at":"2015-11-08T11:54:31Z","updated_at":"2015-11-08T12:11:12Z","pushed_at":"2015-12-03T19:32:46Z","git_url":"git://github.com/s-anches/qna.git","ssh_url":"git@github.com:s-anches/qna.git","clone_url":"https://github.com/s-anches/qna.git","svn_url":"https://github.com/s-anches/qna","homepage":null,"size":147,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/s-anches/qna/pulls/7"},"html":{"href":"https://github.com/s-anches/qna/pull/7"},"issue":{"href":"https://api.github.com/repos/s-anches/qna/issues/7"},"comments":{"href":"https://api.github.com/repos/s-anches/qna/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/s-anches/qna/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/s-anches/qna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/s-anches/qna/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/s-anches/qna/statuses/95b643051997489693bdfc3e870531c330584101"}}}}