{"action":"created","comment":{"url":"https://api.github.com/repos/goadesign/goa/pulls/comments/88829251","pull_request_review_id":9388194,"id":88829251,"diff_hunk":"@@ -0,0 +1,131 @@\n+package dsl_test\n+\n+import (\n+\t\"testing\"\n+\n+\t\"reflect\"\n+\n+\t\"goa.design/goa.v2/design\"\n+\t. \"goa.design/goa.v2/design/dsl\"\n+\t\"goa.design/goa.v2/eval\"\n+)\n+\n+func TestRequest(t *testing.T) {\n+\tvar RequestType = Type(\"Request\", func() {\n+\t\tDescription(\"Optional description\")\n+\t\tAttribute(\"required\", design.String)\n+\t\tAttribute(\"name\", design.String)\n+\t\tRequired(\"required\")\n+\t})\n+\tcases := map[string]struct {\n+\t\tDSL         func()\n+\t\tAssert      func(t *testing.T, req design.DataType)\n+\t\tExpectError bool","path":"design/dsl/request_test.go","position":23,"original_position":23,"commit_id":"7b468d0916747564a980dfbc285227ec7a7519bb","original_commit_id":"7b468d0916747564a980dfbc285227ec7a7519bb","user":{"login":"raphael","id":36822,"avatar_url":"https://avatars.githubusercontent.com/u/36822?v=3","gravatar_id":"","url":"https://api.github.com/users/raphael","html_url":"https://github.com/raphael","followers_url":"https://api.github.com/users/raphael/followers","following_url":"https://api.github.com/users/raphael/following{/other_user}","gists_url":"https://api.github.com/users/raphael/gists{/gist_id}","starred_url":"https://api.github.com/users/raphael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphael/subscriptions","organizations_url":"https://api.github.com/users/raphael/orgs","repos_url":"https://api.github.com/users/raphael/repos","events_url":"https://api.github.com/users/raphael/events{/privacy}","received_events_url":"https://api.github.com/users/raphael/received_events","type":"User","site_admin":false},"body":"I wonder if having an entire different function for the negative testing (testing for errors) wouldn't be better? This other test would be more precise on what type of errors are expected, what the messages are etc.","created_at":"2016-11-21T04:50:15Z","updated_at":"2016-11-21T04:57:46Z","html_url":"https://github.com/goadesign/goa/pull/887#discussion_r88829251","pull_request_url":"https://api.github.com/repos/goadesign/goa/pulls/887","_links":{"self":{"href":"https://api.github.com/repos/goadesign/goa/pulls/comments/88829251"},"html":{"href":"https://github.com/goadesign/goa/pull/887#discussion_r88829251"},"pull_request":{"href":"https://api.github.com/repos/goadesign/goa/pulls/887"}}},"pull_request":{"url":"https://api.github.com/repos/goadesign/goa/pulls/887","id":94534849,"html_url":"https://github.com/goadesign/goa/pull/887","diff_url":"https://github.com/goadesign/goa/pull/887.diff","patch_url":"https://github.com/goadesign/goa/pull/887.patch","issue_url":"https://api.github.com/repos/goadesign/goa/issues/887","number":887,"state":"open","locked":false,"title":"request test initial pass.","user":{"login":"maleck13","id":304628,"avatar_url":"https://avatars.githubusercontent.com/u/304628?v=3","gravatar_id":"","url":"https://api.github.com/users/maleck13","html_url":"https://github.com/maleck13","followers_url":"https://api.github.com/users/maleck13/followers","following_url":"https://api.github.com/users/maleck13/following{/other_user}","gists_url":"https://api.github.com/users/maleck13/gists{/gist_id}","starred_url":"https://api.github.com/users/maleck13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maleck13/subscriptions","organizations_url":"https://api.github.com/users/maleck13/orgs","repos_url":"https://api.github.com/users/maleck13/repos","events_url":"https://api.github.com/users/maleck13/events{/privacy}","received_events_url":"https://api.github.com/users/maleck13/received_events","type":"User","site_admin":false},"body":"@raphael This is not complete yet, but wanted to ask some questions based on writing the test and get any feedback you may have. I will add questions inline","created_at":"2016-11-20T22:11:17Z","updated_at":"2016-11-21T04:57:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e02b5cda982f6894434f8896ce90a0ccb460b1f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/goadesign/goa/pulls/887/commits","review_comments_url":"https://api.github.com/repos/goadesign/goa/pulls/887/comments","review_comment_url":"https://api.github.com/repos/goadesign/goa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/goadesign/goa/issues/887/comments","statuses_url":"https://api.github.com/repos/goadesign/goa/statuses/7b468d0916747564a980dfbc285227ec7a7519bb","head":{"label":"maleck13:request_test","ref":"request_test","sha":"7b468d0916747564a980dfbc285227ec7a7519bb","user":{"login":"maleck13","id":304628,"avatar_url":"https://avatars.githubusercontent.com/u/304628?v=3","gravatar_id":"","url":"https://api.github.com/users/maleck13","html_url":"https://github.com/maleck13","followers_url":"https://api.github.com/users/maleck13/followers","following_url":"https://api.github.com/users/maleck13/following{/other_user}","gists_url":"https://api.github.com/users/maleck13/gists{/gist_id}","starred_url":"https://api.github.com/users/maleck13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maleck13/subscriptions","organizations_url":"https://api.github.com/users/maleck13/orgs","repos_url":"https://api.github.com/users/maleck13/repos","events_url":"https://api.github.com/users/maleck13/events{/privacy}","received_events_url":"https://api.github.com/users/maleck13/received_events","type":"User","site_admin":false},"repo":{"id":68538173,"name":"goa","full_name":"maleck13/goa","owner":{"login":"maleck13","id":304628,"avatar_url":"https://avatars.githubusercontent.com/u/304628?v=3","gravatar_id":"","url":"https://api.github.com/users/maleck13","html_url":"https://github.com/maleck13","followers_url":"https://api.github.com/users/maleck13/followers","following_url":"https://api.github.com/users/maleck13/following{/other_user}","gists_url":"https://api.github.com/users/maleck13/gists{/gist_id}","starred_url":"https://api.github.com/users/maleck13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maleck13/subscriptions","organizations_url":"https://api.github.com/users/maleck13/orgs","repos_url":"https://api.github.com/users/maleck13/repos","events_url":"https://api.github.com/users/maleck13/events{/privacy}","received_events_url":"https://api.github.com/users/maleck13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maleck13/goa","description":"Design-based microservices in Go","fork":true,"url":"https://api.github.com/repos/maleck13/goa","forks_url":"https://api.github.com/repos/maleck13/goa/forks","keys_url":"https://api.github.com/repos/maleck13/goa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maleck13/goa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maleck13/goa/teams","hooks_url":"https://api.github.com/repos/maleck13/goa/hooks","issue_events_url":"https://api.github.com/repos/maleck13/goa/issues/events{/number}","events_url":"https://api.github.com/repos/maleck13/goa/events","assignees_url":"https://api.github.com/repos/maleck13/goa/assignees{/user}","branches_url":"https://api.github.com/repos/maleck13/goa/branches{/branch}","tags_url":"https://api.github.com/repos/maleck13/goa/tags","blobs_url":"https://api.github.com/repos/maleck13/goa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maleck13/goa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maleck13/goa/git/refs{/sha}","trees_url":"https://api.github.com/repos/maleck13/goa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maleck13/goa/statuses/{sha}","languages_url":"https://api.github.com/repos/maleck13/goa/languages","stargazers_url":"https://api.github.com/repos/maleck13/goa/stargazers","contributors_url":"https://api.github.com/repos/maleck13/goa/contributors","subscribers_url":"https://api.github.com/repos/maleck13/goa/subscribers","subscription_url":"https://api.github.com/repos/maleck13/goa/subscription","commits_url":"https://api.github.com/repos/maleck13/goa/commits{/sha}","git_commits_url":"https://api.github.com/repos/maleck13/goa/git/commits{/sha}","comments_url":"https://api.github.com/repos/maleck13/goa/comments{/number}","issue_comment_url":"https://api.github.com/repos/maleck13/goa/issues/comments{/number}","contents_url":"https://api.github.com/repos/maleck13/goa/contents/{+path}","compare_url":"https://api.github.com/repos/maleck13/goa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maleck13/goa/merges","archive_url":"https://api.github.com/repos/maleck13/goa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maleck13/goa/downloads","issues_url":"https://api.github.com/repos/maleck13/goa/issues{/number}","pulls_url":"https://api.github.com/repos/maleck13/goa/pulls{/number}","milestones_url":"https://api.github.com/repos/maleck13/goa/milestones{/number}","notifications_url":"https://api.github.com/repos/maleck13/goa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maleck13/goa/labels{/name}","releases_url":"https://api.github.com/repos/maleck13/goa/releases{/id}","deployments_url":"https://api.github.com/repos/maleck13/goa/deployments","created_at":"2016-09-18T18:03:37Z","updated_at":"2016-09-18T18:03:39Z","pushed_at":"2016-11-20T22:09:58Z","git_url":"git://github.com/maleck13/goa.git","ssh_url":"git@github.com:maleck13/goa.git","clone_url":"https://github.com/maleck13/goa.git","svn_url":"https://github.com/maleck13/goa","homepage":"https://goa.design","size":13160,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"goadesign:v2","ref":"v2","sha":"5d4d1e51a76ca96dc4a905a5ddc505d8dbc55e7a","user":{"login":"goadesign","id":16568515,"avatar_url":"https://avatars.githubusercontent.com/u/16568515?v=3","gravatar_id":"","url":"https://api.github.com/users/goadesign","html_url":"https://github.com/goadesign","followers_url":"https://api.github.com/users/goadesign/followers","following_url":"https://api.github.com/users/goadesign/following{/other_user}","gists_url":"https://api.github.com/users/goadesign/gists{/gist_id}","starred_url":"https://api.github.com/users/goadesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goadesign/subscriptions","organizations_url":"https://api.github.com/users/goadesign/orgs","repos_url":"https://api.github.com/users/goadesign/repos","events_url":"https://api.github.com/users/goadesign/events{/privacy}","received_events_url":"https://api.github.com/users/goadesign/received_events","type":"Organization","site_admin":false},"repo":{"id":27579614,"name":"goa","full_name":"goadesign/goa","owner":{"login":"goadesign","id":16568515,"avatar_url":"https://avatars.githubusercontent.com/u/16568515?v=3","gravatar_id":"","url":"https://api.github.com/users/goadesign","html_url":"https://github.com/goadesign","followers_url":"https://api.github.com/users/goadesign/followers","following_url":"https://api.github.com/users/goadesign/following{/other_user}","gists_url":"https://api.github.com/users/goadesign/gists{/gist_id}","starred_url":"https://api.github.com/users/goadesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goadesign/subscriptions","organizations_url":"https://api.github.com/users/goadesign/orgs","repos_url":"https://api.github.com/users/goadesign/repos","events_url":"https://api.github.com/users/goadesign/events{/privacy}","received_events_url":"https://api.github.com/users/goadesign/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/goadesign/goa","description":"Design-based APIs and microservices in Go","fork":false,"url":"https://api.github.com/repos/goadesign/goa","forks_url":"https://api.github.com/repos/goadesign/goa/forks","keys_url":"https://api.github.com/repos/goadesign/goa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goadesign/goa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goadesign/goa/teams","hooks_url":"https://api.github.com/repos/goadesign/goa/hooks","issue_events_url":"https://api.github.com/repos/goadesign/goa/issues/events{/number}","events_url":"https://api.github.com/repos/goadesign/goa/events","assignees_url":"https://api.github.com/repos/goadesign/goa/assignees{/user}","branches_url":"https://api.github.com/repos/goadesign/goa/branches{/branch}","tags_url":"https://api.github.com/repos/goadesign/goa/tags","blobs_url":"https://api.github.com/repos/goadesign/goa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goadesign/goa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goadesign/goa/git/refs{/sha}","trees_url":"https://api.github.com/repos/goadesign/goa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goadesign/goa/statuses/{sha}","languages_url":"https://api.github.com/repos/goadesign/goa/languages","stargazers_url":"https://api.github.com/repos/goadesign/goa/stargazers","contributors_url":"https://api.github.com/repos/goadesign/goa/contributors","subscribers_url":"https://api.github.com/repos/goadesign/goa/subscribers","subscription_url":"https://api.github.com/repos/goadesign/goa/subscription","commits_url":"https://api.github.com/repos/goadesign/goa/commits{/sha}","git_commits_url":"https://api.github.com/repos/goadesign/goa/git/commits{/sha}","comments_url":"https://api.github.com/repos/goadesign/goa/comments{/number}","issue_comment_url":"https://api.github.com/repos/goadesign/goa/issues/comments{/number}","contents_url":"https://api.github.com/repos/goadesign/goa/contents/{+path}","compare_url":"https://api.github.com/repos/goadesign/goa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goadesign/goa/merges","archive_url":"https://api.github.com/repos/goadesign/goa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goadesign/goa/downloads","issues_url":"https://api.github.com/repos/goadesign/goa/issues{/number}","pulls_url":"https://api.github.com/repos/goadesign/goa/pulls{/number}","milestones_url":"https://api.github.com/repos/goadesign/goa/milestones{/number}","notifications_url":"https://api.github.com/repos/goadesign/goa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goadesign/goa/labels{/name}","releases_url":"https://api.github.com/repos/goadesign/goa/releases{/id}","deployments_url":"https://api.github.com/repos/goadesign/goa/deployments","created_at":"2014-12-05T07:17:53Z","updated_at":"2016-11-21T04:40:10Z","pushed_at":"2016-11-21T00:29:58Z","git_url":"git://github.com/goadesign/goa.git","ssh_url":"git@github.com:goadesign/goa.git","clone_url":"https://github.com/goadesign/goa.git","svn_url":"https://github.com/goadesign/goa","homepage":"https://goa.design","size":14551,"stargazers_count":1480,"watchers_count":1480,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":128,"mirror_url":null,"open_issues_count":50,"forks":128,"open_issues":50,"watchers":1480,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/goadesign/goa/pulls/887"},"html":{"href":"https://github.com/goadesign/goa/pull/887"},"issue":{"href":"https://api.github.com/repos/goadesign/goa/issues/887"},"comments":{"href":"https://api.github.com/repos/goadesign/goa/issues/887/comments"},"review_comments":{"href":"https://api.github.com/repos/goadesign/goa/pulls/887/comments"},"review_comment":{"href":"https://api.github.com/repos/goadesign/goa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/goadesign/goa/pulls/887/commits"},"statuses":{"href":"https://api.github.com/repos/goadesign/goa/statuses/7b468d0916747564a980dfbc285227ec7a7519bb"}}}}
{"actor":{"display_login":"raphael"}}