{"action":"created","comment":{"url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments/83954287","pull_request_review_id":4760433,"id":83954287,"diff_hunk":"@@ -0,0 +1,45 @@\n+import configureMockStore from 'redux-mock-store';\n+import fetchMock from 'fetch-mock';\n+import thunk from 'redux-thunk';\n+import test from 'tape-catch';\n+\n+import * as actions from '../../../src/store/ordersActions';\n+\n+const middlewares = [thunk];\n+const mockStore = configureMockStore(middlewares);\n+\n+test('should dispatch loading action and get action when getting an order', t => {\n+    // given\n+    const id = 1;\n+    fetchMock.get(`/api/orders/${id}`, {});\n+    const store = mockStore({});\n+\n+    // when\n+    return store.dispatch(actions.getOrder(id))\n+        .then(() => {\n+            // then\n+            t.equal(2, store.getActions().length);\n+            t.equal(store.getActions()[0].type, 'FETCHING_ORDER');\n+            t.equal(store.getActions()[1].type, 'GET_ORDER');\n+            t.end();\n+        })\n+        .catch(error => t.end(error.toString()));\n+});\n+\n+test('should dispatch loading action and get action when getting an order for management', t => {\n+    // given\n+    const accessCode = 'asd1';\n+    fetchMock.get(`/api/orders/manage/${accessCode}`, {});\n+    const store = mockStore({});\n+\n+    // when\n+    return store.dispatch(actions.getOrderToManage(accessCode))\n+        .then(() => {\n+            // then\n+            t.equal(2, store.getActions().length);","path":"test/store/orders/actionCreatorsTests.js","position":39,"original_position":39,"commit_id":"5fc6c127f43ad0e2a73307bcfc967ab571184c64","original_commit_id":"ffa130d273d5da5d0aa1407eb16e72b727f72912","user":{"login":"kjendrzyca","id":7491025,"avatar_url":"https://avatars.githubusercontent.com/u/7491025?v=3","gravatar_id":"","url":"https://api.github.com/users/kjendrzyca","html_url":"https://github.com/kjendrzyca","followers_url":"https://api.github.com/users/kjendrzyca/followers","following_url":"https://api.github.com/users/kjendrzyca/following{/other_user}","gists_url":"https://api.github.com/users/kjendrzyca/gists{/gist_id}","starred_url":"https://api.github.com/users/kjendrzyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjendrzyca/subscriptions","organizations_url":"https://api.github.com/users/kjendrzyca/orgs","repos_url":"https://api.github.com/users/kjendrzyca/repos","events_url":"https://api.github.com/users/kjendrzyca/events{/privacy}","received_events_url":"https://api.github.com/users/kjendrzyca/received_events","type":"User","site_admin":false},"body":"switch places of actual and expected","created_at":"2016-10-18T21:25:05Z","updated_at":"2016-10-18T21:39:53Z","html_url":"https://github.com/kjendrzyca/corpo-food/pull/41#discussion_r83954287","pull_request_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments/83954287"},"html":{"href":"https://github.com/kjendrzyca/corpo-food/pull/41#discussion_r83954287"},"pull_request":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41","id":88892830,"html_url":"https://github.com/kjendrzyca/corpo-food/pull/41","diff_url":"https://github.com/kjendrzyca/corpo-food/pull/41.diff","patch_url":"https://github.com/kjendrzyca/corpo-food/pull/41.patch","issue_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41","number":41,"state":"open","locked":false,"title":"Order administration (idea?)","user":{"login":"tarnas14","id":9142942,"avatar_url":"https://avatars.githubusercontent.com/u/9142942?v=3","gravatar_id":"","url":"https://api.github.com/users/tarnas14","html_url":"https://github.com/tarnas14","followers_url":"https://api.github.com/users/tarnas14/followers","following_url":"https://api.github.com/users/tarnas14/following{/other_user}","gists_url":"https://api.github.com/users/tarnas14/gists{/gist_id}","starred_url":"https://api.github.com/users/tarnas14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarnas14/subscriptions","organizations_url":"https://api.github.com/users/tarnas14/orgs","repos_url":"https://api.github.com/users/tarnas14/repos","events_url":"https://api.github.com/users/tarnas14/events{/privacy}","received_events_url":"https://api.github.com/users/tarnas14/received_events","type":"User","site_admin":false},"body":"Here's the idea:\r\n\r\nsharing the access to order administration would be too much of a hassle with Password protection, I think, because you have to put a password that's easy to remember so that you can share it with somebody else in case you are not available when the food arrives (think meetings, plannings, client calls etc.)\r\n\r\nso I thought we could have a special link to an order that would give you administrator's privileges - after creating an order we display that link for the user to store, so it's easy to share with somebody else on a short notice (or with a bunch of people, for that matter)\r\n\r\nwhat do you guys think of this flow?\r\n\r\nI haven't finished everything yet, there are still cosmetics to do: removing magic strings and putting them to resources, maybe figuring out the component composition? I'm open to suggestion and I advise to check out this branch and see the flow for yourself to judge if it's ok or not","created_at":"2016-10-11T19:13:32Z","updated_at":"2016-10-18T21:39:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e0fbdeebff3714d04d18323e04c6d0fe0157fa1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/commits","review_comments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/comments","review_comment_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41/comments","statuses_url":"https://api.github.com/repos/kjendrzyca/corpo-food/statuses/5fc6c127f43ad0e2a73307bcfc967ab571184c64","head":{"label":"tarnas14:order-administration","ref":"order-administration","sha":"5fc6c127f43ad0e2a73307bcfc967ab571184c64","user":{"login":"tarnas14","id":9142942,"avatar_url":"https://avatars.githubusercontent.com/u/9142942?v=3","gravatar_id":"","url":"https://api.github.com/users/tarnas14","html_url":"https://github.com/tarnas14","followers_url":"https://api.github.com/users/tarnas14/followers","following_url":"https://api.github.com/users/tarnas14/following{/other_user}","gists_url":"https://api.github.com/users/tarnas14/gists{/gist_id}","starred_url":"https://api.github.com/users/tarnas14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarnas14/subscriptions","organizations_url":"https://api.github.com/users/tarnas14/orgs","repos_url":"https://api.github.com/users/tarnas14/repos","events_url":"https://api.github.com/users/tarnas14/events{/privacy}","received_events_url":"https://api.github.com/users/tarnas14/received_events","type":"User","site_admin":false},"repo":{"id":54261734,"name":"corpo-food","full_name":"tarnas14/corpo-food","owner":{"login":"tarnas14","id":9142942,"avatar_url":"https://avatars.githubusercontent.com/u/9142942?v=3","gravatar_id":"","url":"https://api.github.com/users/tarnas14","html_url":"https://github.com/tarnas14","followers_url":"https://api.github.com/users/tarnas14/followers","following_url":"https://api.github.com/users/tarnas14/following{/other_user}","gists_url":"https://api.github.com/users/tarnas14/gists{/gist_id}","starred_url":"https://api.github.com/users/tarnas14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarnas14/subscriptions","organizations_url":"https://api.github.com/users/tarnas14/orgs","repos_url":"https://api.github.com/users/tarnas14/repos","events_url":"https://api.github.com/users/tarnas14/events{/privacy}","received_events_url":"https://api.github.com/users/tarnas14/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tarnas14/corpo-food","description":null,"fork":true,"url":"https://api.github.com/repos/tarnas14/corpo-food","forks_url":"https://api.github.com/repos/tarnas14/corpo-food/forks","keys_url":"https://api.github.com/repos/tarnas14/corpo-food/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tarnas14/corpo-food/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tarnas14/corpo-food/teams","hooks_url":"https://api.github.com/repos/tarnas14/corpo-food/hooks","issue_events_url":"https://api.github.com/repos/tarnas14/corpo-food/issues/events{/number}","events_url":"https://api.github.com/repos/tarnas14/corpo-food/events","assignees_url":"https://api.github.com/repos/tarnas14/corpo-food/assignees{/user}","branches_url":"https://api.github.com/repos/tarnas14/corpo-food/branches{/branch}","tags_url":"https://api.github.com/repos/tarnas14/corpo-food/tags","blobs_url":"https://api.github.com/repos/tarnas14/corpo-food/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tarnas14/corpo-food/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tarnas14/corpo-food/git/refs{/sha}","trees_url":"https://api.github.com/repos/tarnas14/corpo-food/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tarnas14/corpo-food/statuses/{sha}","languages_url":"https://api.github.com/repos/tarnas14/corpo-food/languages","stargazers_url":"https://api.github.com/repos/tarnas14/corpo-food/stargazers","contributors_url":"https://api.github.com/repos/tarnas14/corpo-food/contributors","subscribers_url":"https://api.github.com/repos/tarnas14/corpo-food/subscribers","subscription_url":"https://api.github.com/repos/tarnas14/corpo-food/subscription","commits_url":"https://api.github.com/repos/tarnas14/corpo-food/commits{/sha}","git_commits_url":"https://api.github.com/repos/tarnas14/corpo-food/git/commits{/sha}","comments_url":"https://api.github.com/repos/tarnas14/corpo-food/comments{/number}","issue_comment_url":"https://api.github.com/repos/tarnas14/corpo-food/issues/comments{/number}","contents_url":"https://api.github.com/repos/tarnas14/corpo-food/contents/{+path}","compare_url":"https://api.github.com/repos/tarnas14/corpo-food/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tarnas14/corpo-food/merges","archive_url":"https://api.github.com/repos/tarnas14/corpo-food/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tarnas14/corpo-food/downloads","issues_url":"https://api.github.com/repos/tarnas14/corpo-food/issues{/number}","pulls_url":"https://api.github.com/repos/tarnas14/corpo-food/pulls{/number}","milestones_url":"https://api.github.com/repos/tarnas14/corpo-food/milestones{/number}","notifications_url":"https://api.github.com/repos/tarnas14/corpo-food/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tarnas14/corpo-food/labels{/name}","releases_url":"https://api.github.com/repos/tarnas14/corpo-food/releases{/id}","deployments_url":"https://api.github.com/repos/tarnas14/corpo-food/deployments","created_at":"2016-03-19T11:10:55Z","updated_at":"2016-03-19T11:10:58Z","pushed_at":"2016-10-18T21:30:52Z","git_url":"git://github.com/tarnas14/corpo-food.git","ssh_url":"git@github.com:tarnas14/corpo-food.git","clone_url":"https://github.com/tarnas14/corpo-food.git","svn_url":"https://github.com/tarnas14/corpo-food","homepage":null,"size":507,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"kjendrzyca:master","ref":"master","sha":"83b57c130b65aa074208dc8a932d61297da2607d","user":{"login":"kjendrzyca","id":7491025,"avatar_url":"https://avatars.githubusercontent.com/u/7491025?v=3","gravatar_id":"","url":"https://api.github.com/users/kjendrzyca","html_url":"https://github.com/kjendrzyca","followers_url":"https://api.github.com/users/kjendrzyca/followers","following_url":"https://api.github.com/users/kjendrzyca/following{/other_user}","gists_url":"https://api.github.com/users/kjendrzyca/gists{/gist_id}","starred_url":"https://api.github.com/users/kjendrzyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjendrzyca/subscriptions","organizations_url":"https://api.github.com/users/kjendrzyca/orgs","repos_url":"https://api.github.com/users/kjendrzyca/repos","events_url":"https://api.github.com/users/kjendrzyca/events{/privacy}","received_events_url":"https://api.github.com/users/kjendrzyca/received_events","type":"User","site_admin":false},"repo":{"id":54208828,"name":"corpo-food","full_name":"kjendrzyca/corpo-food","owner":{"login":"kjendrzyca","id":7491025,"avatar_url":"https://avatars.githubusercontent.com/u/7491025?v=3","gravatar_id":"","url":"https://api.github.com/users/kjendrzyca","html_url":"https://github.com/kjendrzyca","followers_url":"https://api.github.com/users/kjendrzyca/followers","following_url":"https://api.github.com/users/kjendrzyca/following{/other_user}","gists_url":"https://api.github.com/users/kjendrzyca/gists{/gist_id}","starred_url":"https://api.github.com/users/kjendrzyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjendrzyca/subscriptions","organizations_url":"https://api.github.com/users/kjendrzyca/orgs","repos_url":"https://api.github.com/users/kjendrzyca/repos","events_url":"https://api.github.com/users/kjendrzyca/events{/privacy}","received_events_url":"https://api.github.com/users/kjendrzyca/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kjendrzyca/corpo-food","description":null,"fork":false,"url":"https://api.github.com/repos/kjendrzyca/corpo-food","forks_url":"https://api.github.com/repos/kjendrzyca/corpo-food/forks","keys_url":"https://api.github.com/repos/kjendrzyca/corpo-food/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kjendrzyca/corpo-food/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kjendrzyca/corpo-food/teams","hooks_url":"https://api.github.com/repos/kjendrzyca/corpo-food/hooks","issue_events_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/events{/number}","events_url":"https://api.github.com/repos/kjendrzyca/corpo-food/events","assignees_url":"https://api.github.com/repos/kjendrzyca/corpo-food/assignees{/user}","branches_url":"https://api.github.com/repos/kjendrzyca/corpo-food/branches{/branch}","tags_url":"https://api.github.com/repos/kjendrzyca/corpo-food/tags","blobs_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/refs{/sha}","trees_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kjendrzyca/corpo-food/statuses/{sha}","languages_url":"https://api.github.com/repos/kjendrzyca/corpo-food/languages","stargazers_url":"https://api.github.com/repos/kjendrzyca/corpo-food/stargazers","contributors_url":"https://api.github.com/repos/kjendrzyca/corpo-food/contributors","subscribers_url":"https://api.github.com/repos/kjendrzyca/corpo-food/subscribers","subscription_url":"https://api.github.com/repos/kjendrzyca/corpo-food/subscription","commits_url":"https://api.github.com/repos/kjendrzyca/corpo-food/commits{/sha}","git_commits_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/commits{/sha}","comments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/comments{/number}","issue_comment_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/comments{/number}","contents_url":"https://api.github.com/repos/kjendrzyca/corpo-food/contents/{+path}","compare_url":"https://api.github.com/repos/kjendrzyca/corpo-food/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kjendrzyca/corpo-food/merges","archive_url":"https://api.github.com/repos/kjendrzyca/corpo-food/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kjendrzyca/corpo-food/downloads","issues_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues{/number}","pulls_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls{/number}","milestones_url":"https://api.github.com/repos/kjendrzyca/corpo-food/milestones{/number}","notifications_url":"https://api.github.com/repos/kjendrzyca/corpo-food/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kjendrzyca/corpo-food/labels{/name}","releases_url":"https://api.github.com/repos/kjendrzyca/corpo-food/releases{/id}","deployments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/deployments","created_at":"2016-03-18T14:48:31Z","updated_at":"2016-03-22T12:15:51Z","pushed_at":"2016-10-18T21:30:52Z","git_url":"git://github.com/kjendrzyca/corpo-food.git","ssh_url":"git@github.com:kjendrzyca/corpo-food.git","clone_url":"https://github.com/kjendrzyca/corpo-food.git","svn_url":"https://github.com/kjendrzyca/corpo-food","homepage":null,"size":486,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41"},"html":{"href":"https://github.com/kjendrzyca/corpo-food/pull/41"},"issue":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41"},"comments":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/statuses/5fc6c127f43ad0e2a73307bcfc967ab571184c64"}}}}
{"actor":{"display_login":"kjendrzyca"}}