{"action":"created","comment":{"url":"https://api.github.com/repos/snabble/go-jstore/pulls/comments/204993659","pull_request_review_id":140174571,"id":204993659,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDk5MzY1OQ==","diff_hunk":"@@ -46,6 +47,51 @@ func Test_Create_Success(t *testing.T) {\n \n \tassert.Equal(t, \"project\", requestArg.Project)\n \tassert.Equal(t, \"entity\", requestArg.DocumentType)\n+\n+\tbodyBytes, err := ioutil.ReadAll(response.Body)\n+\trequire.NoError(t, err)\n+\tassert.Equal(t, body, string(bodyBytes))\n+}\n+\n+func Test_Create_Success_Without_Body_Response(t *testing.T) {\n+\tstore, _ := jstore.NewStore(memory.DriverName, \"\")\n+\trouter := mux.NewRouter()\n+\tmessage := \"hello world\"\n+\n+\tvar requestArg Request\n+\tExpose(\n+\t\trouter,\n+\t\tstore,\n+\t\tallPermited,\n+\t\tallPermited,\n+\t\tallPermited,\n+\t\tallPermited,\n+\t\tnullQueryExtractor,\n+\t\tfunc(r Request) (string, interface{}, error) {\n+\t\t\trequestArg = r\n+\t\t\treturn \"id\", TestEntity{Message: message}, nil\n+\t\t},\n+\t\tfunc() interface{} {\n+\t\t\treturn TestEntity{}\n+\t\t},\n+\t\tnullWithLinks,\n+\t\tdocumentTypes,\n+\t\tmap[string]string{},\n+\t\tPostDoNotRespondWithBody(),\n+\t)\n+\tbody := `{\"message\":\"hello world\"}`\n+\n+\tresponse := postRequest(router, \"http://test/project/entity\", body)\n+\n+\trequire.Equal(t, http.StatusCreated, response.Code)\n+\tassert.NotEmpty(t, response.Header().Get(\"Location\"))\n+\n+\tassert.Equal(t, \"project\", requestArg.Project)\n+\tassert.Equal(t, \"entity\", requestArg.DocumentType)\n+\n+\tbodyBytes, err := ioutil.ReadAll(response.Body)\n+\trequire.NoError(t, err)\n+\tassert.Equal(t, \"null\", string(bodyBytes))","path":"http/create_test.go","position":56,"original_position":56,"commit_id":"d8d3d21af8e49a29e1b2b2e491d5be0c56aa1629","original_commit_id":"d8d3d21af8e49a29e1b2b2e491d5be0c56aa1629","user":{"login":"g-w","id":28716,"node_id":"MDQ6VXNlcjI4NzE2","avatar_url":"https://avatars2.githubusercontent.com/u/28716?v=4","gravatar_id":"","url":"https://api.github.com/users/g-w","html_url":"https://github.com/g-w","followers_url":"https://api.github.com/users/g-w/followers","following_url":"https://api.github.com/users/g-w/following{/other_user}","gists_url":"https://api.github.com/users/g-w/gists{/gist_id}","starred_url":"https://api.github.com/users/g-w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g-w/subscriptions","organizations_url":"https://api.github.com/users/g-w/orgs","repos_url":"https://api.github.com/users/g-w/repos","events_url":"https://api.github.com/users/g-w/events{/privacy}","received_events_url":"https://api.github.com/users/g-w/received_events","type":"User","site_admin":false},"body":"Der Body sollte wirklich leer sein.","created_at":"2018-07-25T06:28:28Z","updated_at":"2018-07-25T06:30:08Z","html_url":"https://github.com/snabble/go-jstore/pull/17#discussion_r204993659","pull_request_url":"https://api.github.com/repos/snabble/go-jstore/pulls/17","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/snabble/go-jstore/pulls/comments/204993659"},"html":{"href":"https://github.com/snabble/go-jstore/pull/17#discussion_r204993659"},"pull_request":{"href":"https://api.github.com/repos/snabble/go-jstore/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/snabble/go-jstore/pulls/17","id":203575802,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNTc1ODAy","html_url":"https://github.com/snabble/go-jstore/pull/17","diff_url":"https://github.com/snabble/go-jstore/pull/17.diff","patch_url":"https://github.com/snabble/go-jstore/pull/17.patch","issue_url":"https://api.github.com/repos/snabble/go-jstore/issues/17","number":17,"state":"open","locked":false,"title":"add http config to disable PostResponse","user":{"login":"anni-k","id":7785422,"node_id":"MDQ6VXNlcjc3ODU0MjI=","avatar_url":"https://avatars1.githubusercontent.com/u/7785422?v=4","gravatar_id":"","url":"https://api.github.com/users/anni-k","html_url":"https://github.com/anni-k","followers_url":"https://api.github.com/users/anni-k/followers","following_url":"https://api.github.com/users/anni-k/following{/other_user}","gists_url":"https://api.github.com/users/anni-k/gists{/gist_id}","starred_url":"https://api.github.com/users/anni-k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anni-k/subscriptions","organizations_url":"https://api.github.com/users/anni-k/orgs","repos_url":"https://api.github.com/users/anni-k/repos","events_url":"https://api.github.com/users/anni-k/events{/privacy}","received_events_url":"https://api.github.com/users/anni-k/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-24T15:55:05Z","updated_at":"2018-07-25T06:30:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"097a4abe4699583ea78fa4d570381c29b84f7c5e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/snabble/go-jstore/pulls/17/commits","review_comments_url":"https://api.github.com/repos/snabble/go-jstore/pulls/17/comments","review_comment_url":"https://api.github.com/repos/snabble/go-jstore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snabble/go-jstore/issues/17/comments","statuses_url":"https://api.github.com/repos/snabble/go-jstore/statuses/d8d3d21af8e49a29e1b2b2e491d5be0c56aa1629","head":{"label":"snabble:response-settings","ref":"response-settings","sha":"d8d3d21af8e49a29e1b2b2e491d5be0c56aa1629","user":{"login":"snabble","id":35769962,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzY5OTYy","avatar_url":"https://avatars0.githubusercontent.com/u/35769962?v=4","gravatar_id":"","url":"https://api.github.com/users/snabble","html_url":"https://github.com/snabble","followers_url":"https://api.github.com/users/snabble/followers","following_url":"https://api.github.com/users/snabble/following{/other_user}","gists_url":"https://api.github.com/users/snabble/gists{/gist_id}","starred_url":"https://api.github.com/users/snabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snabble/subscriptions","organizations_url":"https://api.github.com/users/snabble/orgs","repos_url":"https://api.github.com/users/snabble/repos","events_url":"https://api.github.com/users/snabble/events{/privacy}","received_events_url":"https://api.github.com/users/snabble/received_events","type":"Organization","site_admin":false},"repo":{"id":122505586,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI1MDU1ODY=","name":"go-jstore","full_name":"snabble/go-jstore","owner":{"login":"snabble","id":35769962,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzY5OTYy","avatar_url":"https://avatars0.githubusercontent.com/u/35769962?v=4","gravatar_id":"","url":"https://api.github.com/users/snabble","html_url":"https://github.com/snabble","followers_url":"https://api.github.com/users/snabble/followers","following_url":"https://api.github.com/users/snabble/following{/other_user}","gists_url":"https://api.github.com/users/snabble/gists{/gist_id}","starred_url":"https://api.github.com/users/snabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snabble/subscriptions","organizations_url":"https://api.github.com/users/snabble/orgs","repos_url":"https://api.github.com/users/snabble/repos","events_url":"https://api.github.com/users/snabble/events{/privacy}","received_events_url":"https://api.github.com/users/snabble/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snabble/go-jstore","description":"golang json storage abstraction","fork":false,"url":"https://api.github.com/repos/snabble/go-jstore","forks_url":"https://api.github.com/repos/snabble/go-jstore/forks","keys_url":"https://api.github.com/repos/snabble/go-jstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snabble/go-jstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snabble/go-jstore/teams","hooks_url":"https://api.github.com/repos/snabble/go-jstore/hooks","issue_events_url":"https://api.github.com/repos/snabble/go-jstore/issues/events{/number}","events_url":"https://api.github.com/repos/snabble/go-jstore/events","assignees_url":"https://api.github.com/repos/snabble/go-jstore/assignees{/user}","branches_url":"https://api.github.com/repos/snabble/go-jstore/branches{/branch}","tags_url":"https://api.github.com/repos/snabble/go-jstore/tags","blobs_url":"https://api.github.com/repos/snabble/go-jstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snabble/go-jstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snabble/go-jstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/snabble/go-jstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snabble/go-jstore/statuses/{sha}","languages_url":"https://api.github.com/repos/snabble/go-jstore/languages","stargazers_url":"https://api.github.com/repos/snabble/go-jstore/stargazers","contributors_url":"https://api.github.com/repos/snabble/go-jstore/contributors","subscribers_url":"https://api.github.com/repos/snabble/go-jstore/subscribers","subscription_url":"https://api.github.com/repos/snabble/go-jstore/subscription","commits_url":"https://api.github.com/repos/snabble/go-jstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/snabble/go-jstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/snabble/go-jstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/snabble/go-jstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/snabble/go-jstore/contents/{+path}","compare_url":"https://api.github.com/repos/snabble/go-jstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snabble/go-jstore/merges","archive_url":"https://api.github.com/repos/snabble/go-jstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snabble/go-jstore/downloads","issues_url":"https://api.github.com/repos/snabble/go-jstore/issues{/number}","pulls_url":"https://api.github.com/repos/snabble/go-jstore/pulls{/number}","milestones_url":"https://api.github.com/repos/snabble/go-jstore/milestones{/number}","notifications_url":"https://api.github.com/repos/snabble/go-jstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snabble/go-jstore/labels{/name}","releases_url":"https://api.github.com/repos/snabble/go-jstore/releases{/id}","deployments_url":"https://api.github.com/repos/snabble/go-jstore/deployments","created_at":"2018-02-22T16:38:32Z","updated_at":"2018-07-05T07:03:07Z","pushed_at":"2018-07-24T15:55:05Z","git_url":"git://github.com/snabble/go-jstore.git","ssh_url":"git@github.com:snabble/go-jstore.git","clone_url":"https://github.com/snabble/go-jstore.git","svn_url":"https://github.com/snabble/go-jstore","homepage":null,"size":60,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"snabble:master","ref":"master","sha":"d5288cd0ff3b30bf2b8cdc2b933cd0faf227f043","user":{"login":"snabble","id":35769962,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzY5OTYy","avatar_url":"https://avatars0.githubusercontent.com/u/35769962?v=4","gravatar_id":"","url":"https://api.github.com/users/snabble","html_url":"https://github.com/snabble","followers_url":"https://api.github.com/users/snabble/followers","following_url":"https://api.github.com/users/snabble/following{/other_user}","gists_url":"https://api.github.com/users/snabble/gists{/gist_id}","starred_url":"https://api.github.com/users/snabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snabble/subscriptions","organizations_url":"https://api.github.com/users/snabble/orgs","repos_url":"https://api.github.com/users/snabble/repos","events_url":"https://api.github.com/users/snabble/events{/privacy}","received_events_url":"https://api.github.com/users/snabble/received_events","type":"Organization","site_admin":false},"repo":{"id":122505586,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI1MDU1ODY=","name":"go-jstore","full_name":"snabble/go-jstore","owner":{"login":"snabble","id":35769962,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzY5OTYy","avatar_url":"https://avatars0.githubusercontent.com/u/35769962?v=4","gravatar_id":"","url":"https://api.github.com/users/snabble","html_url":"https://github.com/snabble","followers_url":"https://api.github.com/users/snabble/followers","following_url":"https://api.github.com/users/snabble/following{/other_user}","gists_url":"https://api.github.com/users/snabble/gists{/gist_id}","starred_url":"https://api.github.com/users/snabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snabble/subscriptions","organizations_url":"https://api.github.com/users/snabble/orgs","repos_url":"https://api.github.com/users/snabble/repos","events_url":"https://api.github.com/users/snabble/events{/privacy}","received_events_url":"https://api.github.com/users/snabble/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snabble/go-jstore","description":"golang json storage abstraction","fork":false,"url":"https://api.github.com/repos/snabble/go-jstore","forks_url":"https://api.github.com/repos/snabble/go-jstore/forks","keys_url":"https://api.github.com/repos/snabble/go-jstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snabble/go-jstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snabble/go-jstore/teams","hooks_url":"https://api.github.com/repos/snabble/go-jstore/hooks","issue_events_url":"https://api.github.com/repos/snabble/go-jstore/issues/events{/number}","events_url":"https://api.github.com/repos/snabble/go-jstore/events","assignees_url":"https://api.github.com/repos/snabble/go-jstore/assignees{/user}","branches_url":"https://api.github.com/repos/snabble/go-jstore/branches{/branch}","tags_url":"https://api.github.com/repos/snabble/go-jstore/tags","blobs_url":"https://api.github.com/repos/snabble/go-jstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snabble/go-jstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snabble/go-jstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/snabble/go-jstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snabble/go-jstore/statuses/{sha}","languages_url":"https://api.github.com/repos/snabble/go-jstore/languages","stargazers_url":"https://api.github.com/repos/snabble/go-jstore/stargazers","contributors_url":"https://api.github.com/repos/snabble/go-jstore/contributors","subscribers_url":"https://api.github.com/repos/snabble/go-jstore/subscribers","subscription_url":"https://api.github.com/repos/snabble/go-jstore/subscription","commits_url":"https://api.github.com/repos/snabble/go-jstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/snabble/go-jstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/snabble/go-jstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/snabble/go-jstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/snabble/go-jstore/contents/{+path}","compare_url":"https://api.github.com/repos/snabble/go-jstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snabble/go-jstore/merges","archive_url":"https://api.github.com/repos/snabble/go-jstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snabble/go-jstore/downloads","issues_url":"https://api.github.com/repos/snabble/go-jstore/issues{/number}","pulls_url":"https://api.github.com/repos/snabble/go-jstore/pulls{/number}","milestones_url":"https://api.github.com/repos/snabble/go-jstore/milestones{/number}","notifications_url":"https://api.github.com/repos/snabble/go-jstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snabble/go-jstore/labels{/name}","releases_url":"https://api.github.com/repos/snabble/go-jstore/releases{/id}","deployments_url":"https://api.github.com/repos/snabble/go-jstore/deployments","created_at":"2018-02-22T16:38:32Z","updated_at":"2018-07-05T07:03:07Z","pushed_at":"2018-07-24T15:55:05Z","git_url":"git://github.com/snabble/go-jstore.git","ssh_url":"git@github.com:snabble/go-jstore.git","clone_url":"https://github.com/snabble/go-jstore.git","svn_url":"https://github.com/snabble/go-jstore","homepage":null,"size":60,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snabble/go-jstore/pulls/17"},"html":{"href":"https://github.com/snabble/go-jstore/pull/17"},"issue":{"href":"https://api.github.com/repos/snabble/go-jstore/issues/17"},"comments":{"href":"https://api.github.com/repos/snabble/go-jstore/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/snabble/go-jstore/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/snabble/go-jstore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snabble/go-jstore/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/snabble/go-jstore/statuses/d8d3d21af8e49a29e1b2b2e491d5be0c56aa1629"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"g-w"}}