{"action":"created","comment":{"url":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments/39511643","id":39511643,"diff_hunk":"@@ -0,0 +1,23 @@\n+require 'rails_helper'\n+\n+RSpec.describe Search, type: :model do\n+  let(:required) { 'Text' }\n+  let(:where)    { 'Question' }\n+\n+  describe 'search' do\n+    it 'required nil?' do\n+      #expect(Search.search(nil)).to be_nil\n+    end\n+\n+    it 'search if (where) = All' do\n+      expect(ThinkingSphinx).to receive(:search).with(required)\n+      Search.search(required)\n+    end\n+\n+    it 'search if (where) = Q or A or C' do","path":"spec/models/search_spec.rb","position":17,"original_position":17,"commit_id":"a19cba2f9f3f8a3e51374d4958247fc8ab475a47","original_commit_id":"a19cba2f9f3f8a3e51374d4958247fc8ab475a47","user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"body":"Для каждого из вариантов надо тест написать.\r\nИ еще нет тестов на то, если мы передадим пустое значение where или неправильное.","created_at":"2015-09-15T13:51:17Z","updated_at":"2015-09-15T13:51:17Z","html_url":"https://github.com/dimarikpro/qna2/pull/15#discussion_r39511643","pull_request_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments/39511643"},"html":{"href":"https://github.com/dimarikpro/qna2/pull/15#discussion_r39511643"},"pull_request":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/dimarikpro/qna2/pulls/15","id":44703595,"html_url":"https://github.com/dimarikpro/qna2/pull/15","diff_url":"https://github.com/dimarikpro/qna2/pull/15.diff","patch_url":"https://github.com/dimarikpro/qna2/pull/15.patch","issue_url":"https://api.github.com/repos/dimarikpro/qna2/issues/15","number":15,"state":"open","locked":false,"title":"l18 - sphinx","user":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"body":"sphinx","created_at":"2015-09-10T18:40:24Z","updated_at":"2015-09-15T13:51:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b34eff23a110de8a68501d37c86d0920df4f81e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/15/commits","review_comments_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/15/comments","review_comment_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimarikpro/qna2/issues/15/comments","statuses_url":"https://api.github.com/repos/dimarikpro/qna2/statuses/a19cba2f9f3f8a3e51374d4958247fc8ab475a47","head":{"label":"dimarikpro:lesson18","ref":"lesson18","sha":"a19cba2f9f3f8a3e51374d4958247fc8ab475a47","user":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"repo":{"id":36830241,"name":"qna2","full_name":"dimarikpro/qna2","owner":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dimarikpro/qna2","description":"","fork":false,"url":"https://api.github.com/repos/dimarikpro/qna2","forks_url":"https://api.github.com/repos/dimarikpro/qna2/forks","keys_url":"https://api.github.com/repos/dimarikpro/qna2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimarikpro/qna2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimarikpro/qna2/teams","hooks_url":"https://api.github.com/repos/dimarikpro/qna2/hooks","issue_events_url":"https://api.github.com/repos/dimarikpro/qna2/issues/events{/number}","events_url":"https://api.github.com/repos/dimarikpro/qna2/events","assignees_url":"https://api.github.com/repos/dimarikpro/qna2/assignees{/user}","branches_url":"https://api.github.com/repos/dimarikpro/qna2/branches{/branch}","tags_url":"https://api.github.com/repos/dimarikpro/qna2/tags","blobs_url":"https://api.github.com/repos/dimarikpro/qna2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimarikpro/qna2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimarikpro/qna2/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimarikpro/qna2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimarikpro/qna2/statuses/{sha}","languages_url":"https://api.github.com/repos/dimarikpro/qna2/languages","stargazers_url":"https://api.github.com/repos/dimarikpro/qna2/stargazers","contributors_url":"https://api.github.com/repos/dimarikpro/qna2/contributors","subscribers_url":"https://api.github.com/repos/dimarikpro/qna2/subscribers","subscription_url":"https://api.github.com/repos/dimarikpro/qna2/subscription","commits_url":"https://api.github.com/repos/dimarikpro/qna2/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimarikpro/qna2/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimarikpro/qna2/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimarikpro/qna2/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimarikpro/qna2/contents/{+path}","compare_url":"https://api.github.com/repos/dimarikpro/qna2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimarikpro/qna2/merges","archive_url":"https://api.github.com/repos/dimarikpro/qna2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimarikpro/qna2/downloads","issues_url":"https://api.github.com/repos/dimarikpro/qna2/issues{/number}","pulls_url":"https://api.github.com/repos/dimarikpro/qna2/pulls{/number}","milestones_url":"https://api.github.com/repos/dimarikpro/qna2/milestones{/number}","notifications_url":"https://api.github.com/repos/dimarikpro/qna2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimarikpro/qna2/labels{/name}","releases_url":"https://api.github.com/repos/dimarikpro/qna2/releases{/id}","created_at":"2015-06-03T20:58:57Z","updated_at":"2015-06-16T06:18:32Z","pushed_at":"2015-09-15T05:33:31Z","git_url":"git://github.com/dimarikpro/qna2.git","ssh_url":"git@github.com:dimarikpro/qna2.git","clone_url":"https://github.com/dimarikpro/qna2.git","svn_url":"https://github.com/dimarikpro/qna2","homepage":null,"size":43360,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dimarikpro:master","ref":"master","sha":"a720056f8ab6a3adb335a22679f02ae53522bd10","user":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"repo":{"id":36830241,"name":"qna2","full_name":"dimarikpro/qna2","owner":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dimarikpro/qna2","description":"","fork":false,"url":"https://api.github.com/repos/dimarikpro/qna2","forks_url":"https://api.github.com/repos/dimarikpro/qna2/forks","keys_url":"https://api.github.com/repos/dimarikpro/qna2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimarikpro/qna2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimarikpro/qna2/teams","hooks_url":"https://api.github.com/repos/dimarikpro/qna2/hooks","issue_events_url":"https://api.github.com/repos/dimarikpro/qna2/issues/events{/number}","events_url":"https://api.github.com/repos/dimarikpro/qna2/events","assignees_url":"https://api.github.com/repos/dimarikpro/qna2/assignees{/user}","branches_url":"https://api.github.com/repos/dimarikpro/qna2/branches{/branch}","tags_url":"https://api.github.com/repos/dimarikpro/qna2/tags","blobs_url":"https://api.github.com/repos/dimarikpro/qna2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimarikpro/qna2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimarikpro/qna2/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimarikpro/qna2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimarikpro/qna2/statuses/{sha}","languages_url":"https://api.github.com/repos/dimarikpro/qna2/languages","stargazers_url":"https://api.github.com/repos/dimarikpro/qna2/stargazers","contributors_url":"https://api.github.com/repos/dimarikpro/qna2/contributors","subscribers_url":"https://api.github.com/repos/dimarikpro/qna2/subscribers","subscription_url":"https://api.github.com/repos/dimarikpro/qna2/subscription","commits_url":"https://api.github.com/repos/dimarikpro/qna2/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimarikpro/qna2/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimarikpro/qna2/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimarikpro/qna2/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimarikpro/qna2/contents/{+path}","compare_url":"https://api.github.com/repos/dimarikpro/qna2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimarikpro/qna2/merges","archive_url":"https://api.github.com/repos/dimarikpro/qna2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimarikpro/qna2/downloads","issues_url":"https://api.github.com/repos/dimarikpro/qna2/issues{/number}","pulls_url":"https://api.github.com/repos/dimarikpro/qna2/pulls{/number}","milestones_url":"https://api.github.com/repos/dimarikpro/qna2/milestones{/number}","notifications_url":"https://api.github.com/repos/dimarikpro/qna2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimarikpro/qna2/labels{/name}","releases_url":"https://api.github.com/repos/dimarikpro/qna2/releases{/id}","created_at":"2015-06-03T20:58:57Z","updated_at":"2015-06-16T06:18:32Z","pushed_at":"2015-09-15T05:33:31Z","git_url":"git://github.com/dimarikpro/qna2.git","ssh_url":"git@github.com:dimarikpro/qna2.git","clone_url":"https://github.com/dimarikpro/qna2.git","svn_url":"https://github.com/dimarikpro/qna2","homepage":null,"size":43360,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/15"},"html":{"href":"https://github.com/dimarikpro/qna2/pull/15"},"issue":{"href":"https://api.github.com/repos/dimarikpro/qna2/issues/15"},"comments":{"href":"https://api.github.com/repos/dimarikpro/qna2/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/dimarikpro/qna2/statuses/a19cba2f9f3f8a3e51374d4958247fc8ab475a47"}}}}