GitHub PullRequestReviewCommentEvent at 2014-11-21 03:33:12
Repository: spree
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/spree/spree/pulls/comments/20696113","id":20696113,"diff_hunk":"@@ -102,6 +116,58 @@ def initialize(user)\n         expect(assigns[:orders].map { |o| o.number }.count).to eq 1\n       end\n     end\n+\n+    context \"#open_adjustments\" do\n+      let(:closed) { double('closed_adjustments') }\n+\n+      before do\n+        allow(adjustments).to receive(:where).and_return(closed)\n+        allow(closed).to receive(:update_all)\n+      end\n+\n+      it \"changes all the closed adjustments to open\" do\n+        expect(adjustments).to receive(:where).with(state: 'closed')\n+          .and_return(closed)\n+        expect(closed).to receive(:update_all).with(state: 'open')\n+        spree_post :open_adjustments, id: order.number\n+      end\n+\n+      it \"sets the flash success message\" do\n+        spree_post :open_adjustments, id: order.number\n+        expect(flash[:success]).to eql('All adjustments successfully opened!')\n+      end\n+\n+      it \"redirects back\" do\n+        spree_post :open_adjustments, id: order.number\n+        expect(response).to redirect_to(:back)\n+      end\n+    end\n+\n+    context \"#close_adjustments\" do\n+      let(:open) { double('open_adjustments') }\n+\n+      before do\n+        allow(adjustments).to receive(:where).and_return(open)\n+        allow(open).to receive(:update_all)\n+      end\n+\n+      it \"changes all the open adjustments to closed\" do\n+        expect(adjustments).to receive(:where).with(state: 'open')","path":"backend/spec/controllers/spree/admin/orders_controller_spec.rb","position":121,"original_position":121,"commit_id":"240e6b34845da680a88658f9d0a6cefa669f4613","original_commit_id":"240e6b34845da680a88658f9d0a6cefa669f4613","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2014-11-21T03:33:12Z","updated_at":"2014-11-21T03:33:12Z","html_url":"https://github.com/spree/spree/pull/5660#discussion_r20696113","pull_request_url":"https://api.github.com/repos/spree/spree/pulls/5660","_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/comments/20696113"},"html":{"href":"https://github.com/spree/spree/pull/5660#discussion_r20696113"},"pull_request":{"href":"https://api.github.com/repos/spree/spree/pulls/5660"}}},"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/5660","id":24817038,"html_url":"https://github.com/spree/spree/pull/5660","diff_url":"https://github.com/spree/spree/pull/5660.diff","patch_url":"https://github.com/spree/spree/pull/5660.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/5660","number":5660,"state":"closed","locked":false,"title":"Add custom_params to completion_route","user":{"login":"ericsaupe","id":5138892,"avatar_url":"https://avatars.githubusercontent.com/u/5138892?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsaupe","html_url":"https://github.com/ericsaupe","followers_url":"https://api.github.com/users/ericsaupe/followers","following_url":"https://api.github.com/users/ericsaupe/following{/other_user}","gists_url":"https://api.github.com/users/ericsaupe/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsaupe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsaupe/subscriptions","organizations_url":"https://api.github.com/users/ericsaupe/orgs","repos_url":"https://api.github.com/users/ericsaupe/repos","events_url":"https://api.github.com/users/ericsaupe/events{/privacy}","received_events_url":"https://api.github.com/users/ericsaupe/received_events","type":"User","site_admin":false},"body":"Since the method `completion_route` is used instead of the path method it doesn't support setting parameters. It would be nice if we could pass parameters while still using the `completion_route` method.\r\n\r\nThis is a remake of #5658 to be merged into `master`","created_at":"2014-11-21T03:31:02Z","updated_at":"2014-11-21T03:33:12Z","closed_at":"2014-11-21T03:31:19Z","merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spree/spree/pulls/5660/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/5660/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spree/spree/issues/5660/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/240e6b34845da680a88658f9d0a6cefa669f4613","head":{"label":"ericsaupe:patch-1","ref":"patch-1","sha":"240e6b34845da680a88658f9d0a6cefa669f4613","user":{"login":"ericsaupe","id":5138892,"avatar_url":"https://avatars.githubusercontent.com/u/5138892?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsaupe","html_url":"https://github.com/ericsaupe","followers_url":"https://api.github.com/users/ericsaupe/followers","following_url":"https://api.github.com/users/ericsaupe/following{/other_user}","gists_url":"https://api.github.com/users/ericsaupe/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsaupe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsaupe/subscriptions","organizations_url":"https://api.github.com/users/ericsaupe/orgs","repos_url":"https://api.github.com/users/ericsaupe/repos","events_url":"https://api.github.com/users/ericsaupe/events{/privacy}","received_events_url":"https://api.github.com/users/ericsaupe/received_events","type":"User","site_admin":false},"repo":{"id":26935567,"name":"spree","full_name":"ericsaupe/spree","owner":{"login":"ericsaupe","id":5138892,"avatar_url":"https://avatars.githubusercontent.com/u/5138892?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsaupe","html_url":"https://github.com/ericsaupe","followers_url":"https://api.github.com/users/ericsaupe/followers","following_url":"https://api.github.com/users/ericsaupe/following{/other_user}","gists_url":"https://api.github.com/users/ericsaupe/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsaupe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsaupe/subscriptions","organizations_url":"https://api.github.com/users/ericsaupe/orgs","repos_url":"https://api.github.com/users/ericsaupe/repos","events_url":"https://api.github.com/users/ericsaupe/events{/privacy}","received_events_url":"https://api.github.com/users/ericsaupe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ericsaupe/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/ericsaupe/spree","forks_url":"https://api.github.com/repos/ericsaupe/spree/forks","keys_url":"https://api.github.com/repos/ericsaupe/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericsaupe/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericsaupe/spree/teams","hooks_url":"https://api.github.com/repos/ericsaupe/spree/hooks","issue_events_url":"https://api.github.com/repos/ericsaupe/spree/issues/events{/number}","events_url":"https://api.github.com/repos/ericsaupe/spree/events","assignees_url":"https://api.github.com/repos/ericsaupe/spree/assignees{/user}","branches_url":"https://api.github.com/repos/ericsaupe/spree/branches{/branch}","tags_url":"https://api.github.com/repos/ericsaupe/spree/tags","blobs_url":"https://api.github.com/repos/ericsaupe/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericsaupe/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericsaupe/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericsaupe/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericsaupe/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/ericsaupe/spree/languages","stargazers_url":"https://api.github.com/repos/ericsaupe/spree/stargazers","contributors_url":"https://api.github.com/repos/ericsaupe/spree/contributors","subscribers_url":"https://api.github.com/repos/ericsaupe/spree/subscribers","subscription_url":"https://api.github.com/repos/ericsaupe/spree/subscription","commits_url":"https://api.github.com/repos/ericsaupe/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericsaupe/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericsaupe/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericsaupe/spree/issues/comments/{number}","contents_url":"https://api.github.com/repos/ericsaupe/spree/contents/{+path}","compare_url":"https://api.github.com/repos/ericsaupe/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericsaupe/spree/merges","archive_url":"https://api.github.com/repos/ericsaupe/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericsaupe/spree/downloads","issues_url":"https://api.github.com/repos/ericsaupe/spree/issues{/number}","pulls_url":"https://api.github.com/repos/ericsaupe/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/ericsaupe/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/ericsaupe/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericsaupe/spree/labels{/name}","releases_url":"https://api.github.com/repos/ericsaupe/spree/releases{/id}","created_at":"2014-11-20T22:47:44Z","updated_at":"2014-11-20T22:47:50Z","pushed_at":"2014-11-21T03:32:48Z","git_url":"git://github.com/ericsaupe/spree.git","ssh_url":"git@github.com:ericsaupe/spree.git","clone_url":"https://github.com/ericsaupe/spree.git","svn_url":"https://github.com/ericsaupe/spree","homepage":"http://spreecommerce.com","size":139126,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spree:master","ref":"master","sha":"ea9066b47bb5436a21800f72e2b6e974436b821e","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments/{number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","created_at":"2008-03-10T14:45:35Z","updated_at":"2014-11-20T21:34:14Z","pushed_at":"2014-11-20T21:24:49Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":139126,"stargazers_count":5675,"watchers_count":5675,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2626,"mirror_url":null,"open_issues_count":118,"forks":2626,"open_issues":118,"watchers":5675,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/5660"},"html":{"href":"https://github.com/spree/spree/pull/5660"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/5660"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/5660/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/5660/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/5660/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/240e6b34845da680a88658f9d0a6cefa669f4613"}}}}