{"action":"created","comment":{"url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/comments/58432163","id":58432163,"diff_hunk":"@@ -0,0 +1,47 @@\n+require \"rails_helper\"\n+\n+feature \"Send feedback\" do\n+  let(:send_button) { \"Send message\" }\n+\n+  background do\n+    visit contact_path\n+  end\n+\n+  describe \"User sends valid data\" do\n+    background do\n+      fill_form(:feedback, email: \"mail@example.com\", content: \"Lorem Ipsum\")\n+    end\n+\n+    scenario \"new feedback is created in database\" do\n+      expect { click_on send_button }.to change { Feedback.count }.by(1)\n+    end\n+\n+    scenario \"user is redirected to root path\" do\n+      click_on send_button\n+      expect(current_path).to eq root_path\n+    end\n+  end\n+\n+  describe \"User sends invalid data\" do\n+    scenario \"with no email\" do\n+      fill_form(:feedback, content: \"Lorem Ipsum\")\n+      click_on send_button\n+\n+      expect(page).to have_content \"Emailcan't be blank\"\n+    end","path":"spec/features/feedbacks/send_feedback_spec.rb","position":31,"original_position":31,"commit_id":"1e45b6715bbdc721120c6d957ea59a938cbb3605","original_commit_id":"1e45b6715bbdc721120c6d957ea59a938cbb3605","user":{"login":"esender","id":2759149,"avatar_url":"https://avatars.githubusercontent.com/u/2759149?v=3","gravatar_id":"","url":"https://api.github.com/users/esender","html_url":"https://github.com/esender","followers_url":"https://api.github.com/users/esender/followers","following_url":"https://api.github.com/users/esender/following{/other_user}","gists_url":"https://api.github.com/users/esender/gists{/gist_id}","starred_url":"https://api.github.com/users/esender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esender/subscriptions","organizations_url":"https://api.github.com/users/esender/orgs","repos_url":"https://api.github.com/users/esender/repos","events_url":"https://api.github.com/users/esender/events{/privacy}","received_events_url":"https://api.github.com/users/esender/received_events","type":"User","site_admin":false},"body":"Тип читается как будто просто текст читаешь, ну вот. А код спрятан в модуле обертке. И ещё переиспользуется если тестов много.","created_at":"2016-04-04T19:21:12Z","updated_at":"2016-04-04T19:21:12Z","html_url":"https://github.com/slavakisel/pdp-jun/pull/1#discussion_r58432163","pull_request_url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/comments/58432163"},"html":{"href":"https://github.com/slavakisel/pdp-jun/pull/1#discussion_r58432163"},"pull_request":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1","id":65064852,"html_url":"https://github.com/slavakisel/pdp-jun/pull/1","diff_url":"https://github.com/slavakisel/pdp-jun/pull/1.diff","patch_url":"https://github.com/slavakisel/pdp-jun/pull/1.patch","issue_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues/1","number":1,"state":"open","locked":false,"title":"Implement user stories from junior pdp","user":{"login":"slavakisel","id":5993837,"avatar_url":"https://avatars.githubusercontent.com/u/5993837?v=3","gravatar_id":"","url":"https://api.github.com/users/slavakisel","html_url":"https://github.com/slavakisel","followers_url":"https://api.github.com/users/slavakisel/followers","following_url":"https://api.github.com/users/slavakisel/following{/other_user}","gists_url":"https://api.github.com/users/slavakisel/gists{/gist_id}","starred_url":"https://api.github.com/users/slavakisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavakisel/subscriptions","organizations_url":"https://api.github.com/users/slavakisel/orgs","repos_url":"https://api.github.com/users/slavakisel/repos","events_url":"https://api.github.com/users/slavakisel/events{/privacy}","received_events_url":"https://api.github.com/users/slavakisel/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-03T10:32:53Z","updated_at":"2016-04-04T19:21:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9268e3e61131212b27c985db3811d42ec04b2de8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1/commits","review_comments_url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1/comments","review_comment_url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues/1/comments","statuses_url":"https://api.github.com/repos/slavakisel/pdp-jun/statuses/1e45b6715bbdc721120c6d957ea59a938cbb3605","head":{"label":"slavakisel:user-stories","ref":"user-stories","sha":"1e45b6715bbdc721120c6d957ea59a938cbb3605","user":{"login":"slavakisel","id":5993837,"avatar_url":"https://avatars.githubusercontent.com/u/5993837?v=3","gravatar_id":"","url":"https://api.github.com/users/slavakisel","html_url":"https://github.com/slavakisel","followers_url":"https://api.github.com/users/slavakisel/followers","following_url":"https://api.github.com/users/slavakisel/following{/other_user}","gists_url":"https://api.github.com/users/slavakisel/gists{/gist_id}","starred_url":"https://api.github.com/users/slavakisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavakisel/subscriptions","organizations_url":"https://api.github.com/users/slavakisel/orgs","repos_url":"https://api.github.com/users/slavakisel/repos","events_url":"https://api.github.com/users/slavakisel/events{/privacy}","received_events_url":"https://api.github.com/users/slavakisel/received_events","type":"User","site_admin":false},"repo":{"id":55313840,"name":"pdp-jun","full_name":"slavakisel/pdp-jun","owner":{"login":"slavakisel","id":5993837,"avatar_url":"https://avatars.githubusercontent.com/u/5993837?v=3","gravatar_id":"","url":"https://api.github.com/users/slavakisel","html_url":"https://github.com/slavakisel","followers_url":"https://api.github.com/users/slavakisel/followers","following_url":"https://api.github.com/users/slavakisel/following{/other_user}","gists_url":"https://api.github.com/users/slavakisel/gists{/gist_id}","starred_url":"https://api.github.com/users/slavakisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavakisel/subscriptions","organizations_url":"https://api.github.com/users/slavakisel/orgs","repos_url":"https://api.github.com/users/slavakisel/repos","events_url":"https://api.github.com/users/slavakisel/events{/privacy}","received_events_url":"https://api.github.com/users/slavakisel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/slavakisel/pdp-jun","description":"","fork":false,"url":"https://api.github.com/repos/slavakisel/pdp-jun","forks_url":"https://api.github.com/repos/slavakisel/pdp-jun/forks","keys_url":"https://api.github.com/repos/slavakisel/pdp-jun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slavakisel/pdp-jun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slavakisel/pdp-jun/teams","hooks_url":"https://api.github.com/repos/slavakisel/pdp-jun/hooks","issue_events_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues/events{/number}","events_url":"https://api.github.com/repos/slavakisel/pdp-jun/events","assignees_url":"https://api.github.com/repos/slavakisel/pdp-jun/assignees{/user}","branches_url":"https://api.github.com/repos/slavakisel/pdp-jun/branches{/branch}","tags_url":"https://api.github.com/repos/slavakisel/pdp-jun/tags","blobs_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/refs{/sha}","trees_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slavakisel/pdp-jun/statuses/{sha}","languages_url":"https://api.github.com/repos/slavakisel/pdp-jun/languages","stargazers_url":"https://api.github.com/repos/slavakisel/pdp-jun/stargazers","contributors_url":"https://api.github.com/repos/slavakisel/pdp-jun/contributors","subscribers_url":"https://api.github.com/repos/slavakisel/pdp-jun/subscribers","subscription_url":"https://api.github.com/repos/slavakisel/pdp-jun/subscription","commits_url":"https://api.github.com/repos/slavakisel/pdp-jun/commits{/sha}","git_commits_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/commits{/sha}","comments_url":"https://api.github.com/repos/slavakisel/pdp-jun/comments{/number}","issue_comment_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues/comments{/number}","contents_url":"https://api.github.com/repos/slavakisel/pdp-jun/contents/{+path}","compare_url":"https://api.github.com/repos/slavakisel/pdp-jun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slavakisel/pdp-jun/merges","archive_url":"https://api.github.com/repos/slavakisel/pdp-jun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slavakisel/pdp-jun/downloads","issues_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues{/number}","pulls_url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls{/number}","milestones_url":"https://api.github.com/repos/slavakisel/pdp-jun/milestones{/number}","notifications_url":"https://api.github.com/repos/slavakisel/pdp-jun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slavakisel/pdp-jun/labels{/name}","releases_url":"https://api.github.com/repos/slavakisel/pdp-jun/releases{/id}","deployments_url":"https://api.github.com/repos/slavakisel/pdp-jun/deployments","created_at":"2016-04-02T20:06:00Z","updated_at":"2016-04-02T20:09:16Z","pushed_at":"2016-04-04T19:01:07Z","git_url":"git://github.com/slavakisel/pdp-jun.git","ssh_url":"git@github.com:slavakisel/pdp-jun.git","clone_url":"https://github.com/slavakisel/pdp-jun.git","svn_url":"https://github.com/slavakisel/pdp-jun","homepage":null,"size":1499,"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":"user-stories"}},"base":{"label":"slavakisel:master","ref":"master","sha":"d89f5528564495588a9576f632780847bccb2bb8","user":{"login":"slavakisel","id":5993837,"avatar_url":"https://avatars.githubusercontent.com/u/5993837?v=3","gravatar_id":"","url":"https://api.github.com/users/slavakisel","html_url":"https://github.com/slavakisel","followers_url":"https://api.github.com/users/slavakisel/followers","following_url":"https://api.github.com/users/slavakisel/following{/other_user}","gists_url":"https://api.github.com/users/slavakisel/gists{/gist_id}","starred_url":"https://api.github.com/users/slavakisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavakisel/subscriptions","organizations_url":"https://api.github.com/users/slavakisel/orgs","repos_url":"https://api.github.com/users/slavakisel/repos","events_url":"https://api.github.com/users/slavakisel/events{/privacy}","received_events_url":"https://api.github.com/users/slavakisel/received_events","type":"User","site_admin":false},"repo":{"id":55313840,"name":"pdp-jun","full_name":"slavakisel/pdp-jun","owner":{"login":"slavakisel","id":5993837,"avatar_url":"https://avatars.githubusercontent.com/u/5993837?v=3","gravatar_id":"","url":"https://api.github.com/users/slavakisel","html_url":"https://github.com/slavakisel","followers_url":"https://api.github.com/users/slavakisel/followers","following_url":"https://api.github.com/users/slavakisel/following{/other_user}","gists_url":"https://api.github.com/users/slavakisel/gists{/gist_id}","starred_url":"https://api.github.com/users/slavakisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavakisel/subscriptions","organizations_url":"https://api.github.com/users/slavakisel/orgs","repos_url":"https://api.github.com/users/slavakisel/repos","events_url":"https://api.github.com/users/slavakisel/events{/privacy}","received_events_url":"https://api.github.com/users/slavakisel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/slavakisel/pdp-jun","description":"","fork":false,"url":"https://api.github.com/repos/slavakisel/pdp-jun","forks_url":"https://api.github.com/repos/slavakisel/pdp-jun/forks","keys_url":"https://api.github.com/repos/slavakisel/pdp-jun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slavakisel/pdp-jun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slavakisel/pdp-jun/teams","hooks_url":"https://api.github.com/repos/slavakisel/pdp-jun/hooks","issue_events_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues/events{/number}","events_url":"https://api.github.com/repos/slavakisel/pdp-jun/events","assignees_url":"https://api.github.com/repos/slavakisel/pdp-jun/assignees{/user}","branches_url":"https://api.github.com/repos/slavakisel/pdp-jun/branches{/branch}","tags_url":"https://api.github.com/repos/slavakisel/pdp-jun/tags","blobs_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/refs{/sha}","trees_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slavakisel/pdp-jun/statuses/{sha}","languages_url":"https://api.github.com/repos/slavakisel/pdp-jun/languages","stargazers_url":"https://api.github.com/repos/slavakisel/pdp-jun/stargazers","contributors_url":"https://api.github.com/repos/slavakisel/pdp-jun/contributors","subscribers_url":"https://api.github.com/repos/slavakisel/pdp-jun/subscribers","subscription_url":"https://api.github.com/repos/slavakisel/pdp-jun/subscription","commits_url":"https://api.github.com/repos/slavakisel/pdp-jun/commits{/sha}","git_commits_url":"https://api.github.com/repos/slavakisel/pdp-jun/git/commits{/sha}","comments_url":"https://api.github.com/repos/slavakisel/pdp-jun/comments{/number}","issue_comment_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues/comments{/number}","contents_url":"https://api.github.com/repos/slavakisel/pdp-jun/contents/{+path}","compare_url":"https://api.github.com/repos/slavakisel/pdp-jun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slavakisel/pdp-jun/merges","archive_url":"https://api.github.com/repos/slavakisel/pdp-jun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slavakisel/pdp-jun/downloads","issues_url":"https://api.github.com/repos/slavakisel/pdp-jun/issues{/number}","pulls_url":"https://api.github.com/repos/slavakisel/pdp-jun/pulls{/number}","milestones_url":"https://api.github.com/repos/slavakisel/pdp-jun/milestones{/number}","notifications_url":"https://api.github.com/repos/slavakisel/pdp-jun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slavakisel/pdp-jun/labels{/name}","releases_url":"https://api.github.com/repos/slavakisel/pdp-jun/releases{/id}","deployments_url":"https://api.github.com/repos/slavakisel/pdp-jun/deployments","created_at":"2016-04-02T20:06:00Z","updated_at":"2016-04-02T20:09:16Z","pushed_at":"2016-04-04T19:01:07Z","git_url":"git://github.com/slavakisel/pdp-jun.git","ssh_url":"git@github.com:slavakisel/pdp-jun.git","clone_url":"https://github.com/slavakisel/pdp-jun.git","svn_url":"https://github.com/slavakisel/pdp-jun","homepage":null,"size":1499,"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":"user-stories"}},"_links":{"self":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1"},"html":{"href":"https://github.com/slavakisel/pdp-jun/pull/1"},"issue":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/issues/1"},"comments":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/slavakisel/pdp-jun/statuses/1e45b6715bbdc721120c6d957ea59a938cbb3605"}}}}