{"action":"created","comment":{"url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments/32899445","id":32899445,"diff_hunk":"@@ -0,0 +1,140 @@\n+require 'rails_helper'\n+require 'database_cleaner'\n+\n+feature \"an authenticated user's recent order\" do\n+  let(:category) { Category.create!(name: \"Gross\")}\n+  \n+  before(:each) do\n+    @item = Item.create(title: \"Eat Cheese and Die\",\n+      description: \"The spookiest grilled cheese.\",\n+      price: 50.65,\n+      categories: [category])\n+    @user = User.create(email: \"someone@else.new\",\n+      password: \"Seekrit\",\n+      full_name: \"Sir Whats\",\n+      display_name: \"mrwhatsalot\")\n+\n+    allow_any_instance_of(ApplicationController).to receive(:current_user) { @user }\n+\n+    visit root_path\n+\n+    within(\"#items li:nth-child(1)\") do\n+      click_on \"View item\"\n+    end\n+\n+    click_on \"Add to cart\"\n+\n+    click_on \"Checkout\"\n+  end\n+\n+  scenario 'will be displayed' do\n+    order = @user.orders.last\n+    \n+    expect(current_path).to eq(order_path(order))\n+    expect(page).to have_content(\"You have purchased 1 spooky item(s)\")\n+    expect(page).to have_content(\"$50.65\")\n+    expect(page).to have_content(\"Eat Cheese and Die\")\n+  end\n+  \n+  scenario 'will show status' do\n+    order = @user.orders.last\n+\n+    expect(current_path).to eq(order_path(order))\n+    expect(page).to have_content(\"Order Status: ordered\")\n+  end\n+end\n+\n+feature \"an authenticated user's past orders\" do\n+  let(:category) { Category.create!(name: \"Gross\")}\n+\n+  before(:each) do\n+    @item1 = Item.create!(title: \"Eat Cheese and Die\",\n+      description: \"The spookiest grilled cheese.\",\n+      price: 50.65,\n+      categories: [category])\n+\n+    @item2 = Item.create!(title: \"It Came From Under the Sink\",\n+      description: \"The spookiest grilled cheese.\",\n+      price: 10.10,\n+      categories: [category])\n+\n+    @user = User.create!(email: \"fml@database.sucks\",\n+      password: \"Seekrit\",\n+      full_name: \"Sir Whats\",\n+      display_name: \"mrwhatsalot\")\n+\n+    @order1 = Order.create!(user_id: @user.id,\n+      total_price: 50.65,\n+      items: [@item1],\n+      created_at: \"2015-06-11 19:35:07\",\n+      updated_at: \"2015-06-12 10:22:17\",\n+      status: \"complete\")\n+\n+    @order2 = Order.create!(user_id: @user.id,\n+      total_price: 10.10,\n+      items: [@item2],","path":"spec/features/user/user_views_past_orders_spec.rb","position":75,"original_position":75,"commit_id":"e134a2665513f9bdbf333604854c1940e25ce0e7","original_commit_id":"e134a2665513f9bdbf333604854c1940e25ce0e7","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Align the elements of a hash literal if they span more than one line.","created_at":"2015-06-21T23:39:59Z","updated_at":"2015-06-21T23:39:59Z","html_url":"https://github.com/morganmiller/dinner_dash/pull/54#discussion_r32899445","pull_request_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments/32899445"},"html":{"href":"https://github.com/morganmiller/dinner_dash/pull/54#discussion_r32899445"},"pull_request":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54","id":38192922,"html_url":"https://github.com/morganmiller/dinner_dash/pull/54","diff_url":"https://github.com/morganmiller/dinner_dash/pull/54.diff","patch_url":"https://github.com/morganmiller/dinner_dash/pull/54.patch","issue_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/54","number":54,"state":"open","locked":false,"title":"User orders","user":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"body":"closes #14, closes #15, closes #20, closes #18, closes #22, closes #19, closes #21","created_at":"2015-06-21T23:39:49Z","updated_at":"2015-06-21T23:39:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25507dea6b4bbaabed0433f65f9f9303ff9c9e4d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54/commits","review_comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54/comments","review_comment_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/54/comments","statuses_url":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/e134a2665513f9bdbf333604854c1940e25ce0e7","head":{"label":"morganmiller:user_orders","ref":"user_orders","sha":"e134a2665513f9bdbf333604854c1940e25ce0e7","user":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"repo":{"id":37473171,"name":"dinner_dash","full_name":"morganmiller/dinner_dash","owner":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morganmiller/dinner_dash","description":"","fork":false,"url":"https://api.github.com/repos/morganmiller/dinner_dash","forks_url":"https://api.github.com/repos/morganmiller/dinner_dash/forks","keys_url":"https://api.github.com/repos/morganmiller/dinner_dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morganmiller/dinner_dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morganmiller/dinner_dash/teams","hooks_url":"https://api.github.com/repos/morganmiller/dinner_dash/hooks","issue_events_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/events{/number}","events_url":"https://api.github.com/repos/morganmiller/dinner_dash/events","assignees_url":"https://api.github.com/repos/morganmiller/dinner_dash/assignees{/user}","branches_url":"https://api.github.com/repos/morganmiller/dinner_dash/branches{/branch}","tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/tags","blobs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/{sha}","languages_url":"https://api.github.com/repos/morganmiller/dinner_dash/languages","stargazers_url":"https://api.github.com/repos/morganmiller/dinner_dash/stargazers","contributors_url":"https://api.github.com/repos/morganmiller/dinner_dash/contributors","subscribers_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscribers","subscription_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscription","commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/morganmiller/dinner_dash/contents/{+path}","compare_url":"https://api.github.com/repos/morganmiller/dinner_dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morganmiller/dinner_dash/merges","archive_url":"https://api.github.com/repos/morganmiller/dinner_dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morganmiller/dinner_dash/downloads","issues_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues{/number}","pulls_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls{/number}","milestones_url":"https://api.github.com/repos/morganmiller/dinner_dash/milestones{/number}","notifications_url":"https://api.github.com/repos/morganmiller/dinner_dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morganmiller/dinner_dash/labels{/name}","releases_url":"https://api.github.com/repos/morganmiller/dinner_dash/releases{/id}","created_at":"2015-06-15T15:18:40Z","updated_at":"2015-06-21T05:26:37Z","pushed_at":"2015-06-21T23:39:49Z","git_url":"git://github.com/morganmiller/dinner_dash.git","ssh_url":"git@github.com:morganmiller/dinner_dash.git","clone_url":"https://github.com/morganmiller/dinner_dash.git","svn_url":"https://github.com/morganmiller/dinner_dash","homepage":null,"size":0,"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":27,"forks":0,"open_issues":27,"watchers":0,"default_branch":"master"}},"base":{"label":"morganmiller:master","ref":"master","sha":"20d5e5c3e91ad0cf64cf22b473c09ac927945e74","user":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"repo":{"id":37473171,"name":"dinner_dash","full_name":"morganmiller/dinner_dash","owner":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morganmiller/dinner_dash","description":"","fork":false,"url":"https://api.github.com/repos/morganmiller/dinner_dash","forks_url":"https://api.github.com/repos/morganmiller/dinner_dash/forks","keys_url":"https://api.github.com/repos/morganmiller/dinner_dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morganmiller/dinner_dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morganmiller/dinner_dash/teams","hooks_url":"https://api.github.com/repos/morganmiller/dinner_dash/hooks","issue_events_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/events{/number}","events_url":"https://api.github.com/repos/morganmiller/dinner_dash/events","assignees_url":"https://api.github.com/repos/morganmiller/dinner_dash/assignees{/user}","branches_url":"https://api.github.com/repos/morganmiller/dinner_dash/branches{/branch}","tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/tags","blobs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/{sha}","languages_url":"https://api.github.com/repos/morganmiller/dinner_dash/languages","stargazers_url":"https://api.github.com/repos/morganmiller/dinner_dash/stargazers","contributors_url":"https://api.github.com/repos/morganmiller/dinner_dash/contributors","subscribers_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscribers","subscription_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscription","commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/morganmiller/dinner_dash/contents/{+path}","compare_url":"https://api.github.com/repos/morganmiller/dinner_dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morganmiller/dinner_dash/merges","archive_url":"https://api.github.com/repos/morganmiller/dinner_dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morganmiller/dinner_dash/downloads","issues_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues{/number}","pulls_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls{/number}","milestones_url":"https://api.github.com/repos/morganmiller/dinner_dash/milestones{/number}","notifications_url":"https://api.github.com/repos/morganmiller/dinner_dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morganmiller/dinner_dash/labels{/name}","releases_url":"https://api.github.com/repos/morganmiller/dinner_dash/releases{/id}","created_at":"2015-06-15T15:18:40Z","updated_at":"2015-06-21T05:26:37Z","pushed_at":"2015-06-21T23:39:49Z","git_url":"git://github.com/morganmiller/dinner_dash.git","ssh_url":"git@github.com:morganmiller/dinner_dash.git","clone_url":"https://github.com/morganmiller/dinner_dash.git","svn_url":"https://github.com/morganmiller/dinner_dash","homepage":null,"size":0,"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":27,"forks":0,"open_issues":27,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54"},"html":{"href":"https://github.com/morganmiller/dinner_dash/pull/54"},"issue":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/issues/54"},"comments":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/e134a2665513f9bdbf333604854c1940e25ce0e7"}}}}