{"action":"closed","number":1725,"pull_request":{"url":"https://api.github.com/repos/wellcometrust/platform/pulls/1725","id":177018376,"html_url":"https://github.com/wellcometrust/platform/pull/1725","diff_url":"https://github.com/wellcometrust/platform/pull/1725.diff","patch_url":"https://github.com/wellcometrust/platform/pull/1725.patch","issue_url":"https://api.github.com/repos/wellcometrust/platform/issues/1725","number":1725,"state":"closed","locked":false,"title":"Simplify json serialisation/deserialisation tests","user":{"login":"alicefuzier","id":26736746,"avatar_url":"https://avatars3.githubusercontent.com/u/26736746?v=4","gravatar_id":"","url":"https://api.github.com/users/alicefuzier","html_url":"https://github.com/alicefuzier","followers_url":"https://api.github.com/users/alicefuzier/followers","following_url":"https://api.github.com/users/alicefuzier/following{/other_user}","gists_url":"https://api.github.com/users/alicefuzier/gists{/gist_id}","starred_url":"https://api.github.com/users/alicefuzier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicefuzier/subscriptions","organizations_url":"https://api.github.com/users/alicefuzier/orgs","repos_url":"https://api.github.com/users/alicefuzier/repos","events_url":"https://api.github.com/users/alicefuzier/events{/privacy}","received_events_url":"https://api.github.com/users/alicefuzier/received_events","type":"User","site_admin":false},"body":"We have a bunch of tests that assert on what the JSON serialisation for our internal models looks like. They are all very similar and they seem to overlap as to what they test. Also, they are very annoying in terms to keeping them up to date when the model changes because we have to write the raw JSON and it's very easy to get wrong.\r\n\r\nWe don't really care about what the JSON looks like since it's only internal. We only care about ensuring that serialisation/deserialisation doesn't change the original content. Also, we only ever serialise `UnidentifiedItem` or `IdentifiedItem`. \r\n\r\nSo, this PR is:\r\n- making the `UnidentifiedWorkTest` and `IdentifiedWorkTest` use automagically generate values, so we don't always need to change them if we change the model\r\n- only test the round trip serialisation/deserialisation, not the actual JSON string\r\n- delete tests made redundant by the `UnidentifiedWorkTest` and `IdentifiedWorkTest`\r\n### Who is this change for?\r\n🐣 🐥 🐤 \r\n\r\n\r\n","created_at":"2018-03-23T09:51:30Z","updated_at":"2018-03-26T10:36:59Z","closed_at":"2018-03-26T10:36:59Z","merged_at":null,"merge_commit_sha":"02981e9d3bb4c6f9747bcdcd3c6c90820bc3b404","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rgladwell","id":209292,"avatar_url":"https://avatars0.githubusercontent.com/u/209292?v=4","gravatar_id":"","url":"https://api.github.com/users/rgladwell","html_url":"https://github.com/rgladwell","followers_url":"https://api.github.com/users/rgladwell/followers","following_url":"https://api.github.com/users/rgladwell/following{/other_user}","gists_url":"https://api.github.com/users/rgladwell/gists{/gist_id}","starred_url":"https://api.github.com/users/rgladwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgladwell/subscriptions","organizations_url":"https://api.github.com/users/rgladwell/orgs","repos_url":"https://api.github.com/users/rgladwell/repos","events_url":"https://api.github.com/users/rgladwell/events{/privacy}","received_events_url":"https://api.github.com/users/rgladwell/received_events","type":"User","site_admin":false},{"login":"alexwlchan","id":301220,"avatar_url":"https://avatars0.githubusercontent.com/u/301220?v=4","gravatar_id":"","url":"https://api.github.com/users/alexwlchan","html_url":"https://github.com/alexwlchan","followers_url":"https://api.github.com/users/alexwlchan/followers","following_url":"https://api.github.com/users/alexwlchan/following{/other_user}","gists_url":"https://api.github.com/users/alexwlchan/gists{/gist_id}","starred_url":"https://api.github.com/users/alexwlchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexwlchan/subscriptions","organizations_url":"https://api.github.com/users/alexwlchan/orgs","repos_url":"https://api.github.com/users/alexwlchan/repos","events_url":"https://api.github.com/users/alexwlchan/events{/privacy}","received_events_url":"https://api.github.com/users/alexwlchan/received_events","type":"User","site_admin":false},{"login":"kenoir","id":953792,"avatar_url":"https://avatars3.githubusercontent.com/u/953792?v=4","gravatar_id":"","url":"https://api.github.com/users/kenoir","html_url":"https://github.com/kenoir","followers_url":"https://api.github.com/users/kenoir/followers","following_url":"https://api.github.com/users/kenoir/following{/other_user}","gists_url":"https://api.github.com/users/kenoir/gists{/gist_id}","starred_url":"https://api.github.com/users/kenoir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenoir/subscriptions","organizations_url":"https://api.github.com/users/kenoir/orgs","repos_url":"https://api.github.com/users/kenoir/repos","events_url":"https://api.github.com/users/kenoir/events{/privacy}","received_events_url":"https://api.github.com/users/kenoir/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wellcometrust/platform/pulls/1725/commits","review_comments_url":"https://api.github.com/repos/wellcometrust/platform/pulls/1725/comments","review_comment_url":"https://api.github.com/repos/wellcometrust/platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wellcometrust/platform/issues/1725/comments","statuses_url":"https://api.github.com/repos/wellcometrust/platform/statuses/d9c0e6965b71148e8cf092a4092da71d303b9880","head":{"label":"wellcometrust:simplify-json-parsing-tests","ref":"simplify-json-parsing-tests","sha":"d9c0e6965b71148e8cf092a4092da71d303b9880","user":{"login":"wellcometrust","id":2814213,"avatar_url":"https://avatars3.githubusercontent.com/u/2814213?v=4","gravatar_id":"","url":"https://api.github.com/users/wellcometrust","html_url":"https://github.com/wellcometrust","followers_url":"https://api.github.com/users/wellcometrust/followers","following_url":"https://api.github.com/users/wellcometrust/following{/other_user}","gists_url":"https://api.github.com/users/wellcometrust/gists{/gist_id}","starred_url":"https://api.github.com/users/wellcometrust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wellcometrust/subscriptions","organizations_url":"https://api.github.com/users/wellcometrust/orgs","repos_url":"https://api.github.com/users/wellcometrust/repos","events_url":"https://api.github.com/users/wellcometrust/events{/privacy}","received_events_url":"https://api.github.com/users/wellcometrust/received_events","type":"Organization","site_admin":false},"repo":{"id":80218943,"name":"platform","full_name":"wellcometrust/platform","owner":{"login":"wellcometrust","id":2814213,"avatar_url":"https://avatars3.githubusercontent.com/u/2814213?v=4","gravatar_id":"","url":"https://api.github.com/users/wellcometrust","html_url":"https://github.com/wellcometrust","followers_url":"https://api.github.com/users/wellcometrust/followers","following_url":"https://api.github.com/users/wellcometrust/following{/other_user}","gists_url":"https://api.github.com/users/wellcometrust/gists{/gist_id}","starred_url":"https://api.github.com/users/wellcometrust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wellcometrust/subscriptions","organizations_url":"https://api.github.com/users/wellcometrust/orgs","repos_url":"https://api.github.com/users/wellcometrust/repos","events_url":"https://api.github.com/users/wellcometrust/events{/privacy}","received_events_url":"https://api.github.com/users/wellcometrust/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wellcometrust/platform","description":"Wellcome Collection digital platform","fork":false,"url":"https://api.github.com/repos/wellcometrust/platform","forks_url":"https://api.github.com/repos/wellcometrust/platform/forks","keys_url":"https://api.github.com/repos/wellcometrust/platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wellcometrust/platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wellcometrust/platform/teams","hooks_url":"https://api.github.com/repos/wellcometrust/platform/hooks","issue_events_url":"https://api.github.com/repos/wellcometrust/platform/issues/events{/number}","events_url":"https://api.github.com/repos/wellcometrust/platform/events","assignees_url":"https://api.github.com/repos/wellcometrust/platform/assignees{/user}","branches_url":"https://api.github.com/repos/wellcometrust/platform/branches{/branch}","tags_url":"https://api.github.com/repos/wellcometrust/platform/tags","blobs_url":"https://api.github.com/repos/wellcometrust/platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wellcometrust/platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wellcometrust/platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/wellcometrust/platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wellcometrust/platform/statuses/{sha}","languages_url":"https://api.github.com/repos/wellcometrust/platform/languages","stargazers_url":"https://api.github.com/repos/wellcometrust/platform/stargazers","contributors_url":"https://api.github.com/repos/wellcometrust/platform/contributors","subscribers_url":"https://api.github.com/repos/wellcometrust/platform/subscribers","subscription_url":"https://api.github.com/repos/wellcometrust/platform/subscription","commits_url":"https://api.github.com/repos/wellcometrust/platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/wellcometrust/platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/wellcometrust/platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/wellcometrust/platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/wellcometrust/platform/contents/{+path}","compare_url":"https://api.github.com/repos/wellcometrust/platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wellcometrust/platform/merges","archive_url":"https://api.github.com/repos/wellcometrust/platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wellcometrust/platform/downloads","issues_url":"https://api.github.com/repos/wellcometrust/platform/issues{/number}","pulls_url":"https://api.github.com/repos/wellcometrust/platform/pulls{/number}","milestones_url":"https://api.github.com/repos/wellcometrust/platform/milestones{/number}","notifications_url":"https://api.github.com/repos/wellcometrust/platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wellcometrust/platform/labels{/name}","releases_url":"https://api.github.com/repos/wellcometrust/platform/releases{/id}","deployments_url":"https://api.github.com/repos/wellcometrust/platform/deployments","created_at":"2017-01-27T15:27:42Z","updated_at":"2018-03-24T20:38:16Z","pushed_at":"2018-03-26T09:39:50Z","git_url":"git://github.com/wellcometrust/platform.git","ssh_url":"git@github.com:wellcometrust/platform.git","clone_url":"https://github.com/wellcometrust/platform.git","svn_url":"https://github.com/wellcometrust/platform","homepage":"https://developers.wellcomecollection.org/","size":12118,"stargazers_count":13,"watchers_count":13,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":125,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":125,"watchers":13,"default_branch":"master"}},"base":{"label":"wellcometrust:master","ref":"master","sha":"3562d08f3af0739b5fb86bbd615eacb25ec4cd4e","user":{"login":"wellcometrust","id":2814213,"avatar_url":"https://avatars3.githubusercontent.com/u/2814213?v=4","gravatar_id":"","url":"https://api.github.com/users/wellcometrust","html_url":"https://github.com/wellcometrust","followers_url":"https://api.github.com/users/wellcometrust/followers","following_url":"https://api.github.com/users/wellcometrust/following{/other_user}","gists_url":"https://api.github.com/users/wellcometrust/gists{/gist_id}","starred_url":"https://api.github.com/users/wellcometrust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wellcometrust/subscriptions","organizations_url":"https://api.github.com/users/wellcometrust/orgs","repos_url":"https://api.github.com/users/wellcometrust/repos","events_url":"https://api.github.com/users/wellcometrust/events{/privacy}","received_events_url":"https://api.github.com/users/wellcometrust/received_events","type":"Organization","site_admin":false},"repo":{"id":80218943,"name":"platform","full_name":"wellcometrust/platform","owner":{"login":"wellcometrust","id":2814213,"avatar_url":"https://avatars3.githubusercontent.com/u/2814213?v=4","gravatar_id":"","url":"https://api.github.com/users/wellcometrust","html_url":"https://github.com/wellcometrust","followers_url":"https://api.github.com/users/wellcometrust/followers","following_url":"https://api.github.com/users/wellcometrust/following{/other_user}","gists_url":"https://api.github.com/users/wellcometrust/gists{/gist_id}","starred_url":"https://api.github.com/users/wellcometrust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wellcometrust/subscriptions","organizations_url":"https://api.github.com/users/wellcometrust/orgs","repos_url":"https://api.github.com/users/wellcometrust/repos","events_url":"https://api.github.com/users/wellcometrust/events{/privacy}","received_events_url":"https://api.github.com/users/wellcometrust/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wellcometrust/platform","description":"Wellcome Collection digital platform","fork":false,"url":"https://api.github.com/repos/wellcometrust/platform","forks_url":"https://api.github.com/repos/wellcometrust/platform/forks","keys_url":"https://api.github.com/repos/wellcometrust/platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wellcometrust/platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wellcometrust/platform/teams","hooks_url":"https://api.github.com/repos/wellcometrust/platform/hooks","issue_events_url":"https://api.github.com/repos/wellcometrust/platform/issues/events{/number}","events_url":"https://api.github.com/repos/wellcometrust/platform/events","assignees_url":"https://api.github.com/repos/wellcometrust/platform/assignees{/user}","branches_url":"https://api.github.com/repos/wellcometrust/platform/branches{/branch}","tags_url":"https://api.github.com/repos/wellcometrust/platform/tags","blobs_url":"https://api.github.com/repos/wellcometrust/platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wellcometrust/platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wellcometrust/platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/wellcometrust/platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wellcometrust/platform/statuses/{sha}","languages_url":"https://api.github.com/repos/wellcometrust/platform/languages","stargazers_url":"https://api.github.com/repos/wellcometrust/platform/stargazers","contributors_url":"https://api.github.com/repos/wellcometrust/platform/contributors","subscribers_url":"https://api.github.com/repos/wellcometrust/platform/subscribers","subscription_url":"https://api.github.com/repos/wellcometrust/platform/subscription","commits_url":"https://api.github.com/repos/wellcometrust/platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/wellcometrust/platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/wellcometrust/platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/wellcometrust/platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/wellcometrust/platform/contents/{+path}","compare_url":"https://api.github.com/repos/wellcometrust/platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wellcometrust/platform/merges","archive_url":"https://api.github.com/repos/wellcometrust/platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wellcometrust/platform/downloads","issues_url":"https://api.github.com/repos/wellcometrust/platform/issues{/number}","pulls_url":"https://api.github.com/repos/wellcometrust/platform/pulls{/number}","milestones_url":"https://api.github.com/repos/wellcometrust/platform/milestones{/number}","notifications_url":"https://api.github.com/repos/wellcometrust/platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wellcometrust/platform/labels{/name}","releases_url":"https://api.github.com/repos/wellcometrust/platform/releases{/id}","deployments_url":"https://api.github.com/repos/wellcometrust/platform/deployments","created_at":"2017-01-27T15:27:42Z","updated_at":"2018-03-24T20:38:16Z","pushed_at":"2018-03-26T09:39:50Z","git_url":"git://github.com/wellcometrust/platform.git","ssh_url":"git@github.com:wellcometrust/platform.git","clone_url":"https://github.com/wellcometrust/platform.git","svn_url":"https://github.com/wellcometrust/platform","homepage":"https://developers.wellcomecollection.org/","size":12118,"stargazers_count":13,"watchers_count":13,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":125,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":125,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wellcometrust/platform/pulls/1725"},"html":{"href":"https://github.com/wellcometrust/platform/pull/1725"},"issue":{"href":"https://api.github.com/repos/wellcometrust/platform/issues/1725"},"comments":{"href":"https://api.github.com/repos/wellcometrust/platform/issues/1725/comments"},"review_comments":{"href":"https://api.github.com/repos/wellcometrust/platform/pulls/1725/comments"},"review_comment":{"href":"https://api.github.com/repos/wellcometrust/platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wellcometrust/platform/pulls/1725/commits"},"statuses":{"href":"https://api.github.com/repos/wellcometrust/platform/statuses/d9c0e6965b71148e8cf092a4092da71d303b9880"}},"author_association":"COLLABORATOR","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":32,"deletions":617,"changed_files":5}}
{"actor":{"display_login":"alicefuzier"}}