{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments/67505664","id":67505664,"diff_hunk":"@@ -0,0 +1,16 @@\n+require 'spec_helper'\n+\n+RSpec.describe FinderSignupContentItemPresenter do\n+  file = 'lib/documents/schemas/cma_cases.json'\n+  read_file = File.read(file)\n+  let(:payload) { JSON.parse(read_file) }\n+  let(:finder_signup_content_presenter) { FinderSignupContentItemPresenter.new(payload, File.mtime(file)) }\n+  let(:presented_data) { finder_signup_content_presenter.to_json }\n+\n+  describe \"#to_json\" do\n+    it \"is valid against the content schemas\" do\n+      expect(presented_data[:schema_name]).to eq(\"finder_email_signup\")\n+      expect(presented_data).to be_valid_against_schema(\"finder_email_signup\")\n+    end\n+  end\n+end","path":"spec/presenters/finders/finder_signup_content_item_presenter_spec.rb","position":16,"original_position":16,"commit_id":"447d722eff685ff9437322d995a1938cf0fd2419","original_commit_id":"447d722eff685ff9437322d995a1938cf0fd2419","user":{"login":"tuzz","id":892251,"avatar_url":"https://avatars.githubusercontent.com/u/892251?v=3","gravatar_id":"","url":"https://api.github.com/users/tuzz","html_url":"https://github.com/tuzz","followers_url":"https://api.github.com/users/tuzz/followers","following_url":"https://api.github.com/users/tuzz/following{/other_user}","gists_url":"https://api.github.com/users/tuzz/gists{/gist_id}","starred_url":"https://api.github.com/users/tuzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuzz/subscriptions","organizations_url":"https://api.github.com/users/tuzz/orgs","repos_url":"https://api.github.com/users/tuzz/repos","events_url":"https://api.github.com/users/tuzz/events{/privacy}","received_events_url":"https://api.github.com/users/tuzz/received_events","type":"User","site_admin":false},"body":"I was thinking it might be nice to iterate through all the schemas in `lib/documents/schemas` and validate them in this test. I think you could do `Dir[\"lib/documents/schemas/*.json\"].each` or something similar.\r\n\r\nI think this would help to future-proof us if we decide to make changes to the content schema and want to check that all of our schemas still validate. What do you think?","created_at":"2016-06-17T12:58:00Z","updated_at":"2016-06-17T12:58:00Z","html_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/803#discussion_r67505664","pull_request_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803","_links":{"self":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments/67505664"},"html":{"href":"https://github.com/alphagov/specialist-publisher-rebuild/pull/803#discussion_r67505664"},"pull_request":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803","id":74111928,"html_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/803","diff_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/803.diff","patch_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/803.patch","issue_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/803","number":803,"state":"open","locked":false,"title":"Update finder signup content item presenter","user":{"login":"Seraphiana","id":5594262,"avatar_url":"https://avatars.githubusercontent.com/u/5594262?v=3","gravatar_id":"","url":"https://api.github.com/users/Seraphiana","html_url":"https://github.com/Seraphiana","followers_url":"https://api.github.com/users/Seraphiana/followers","following_url":"https://api.github.com/users/Seraphiana/following{/other_user}","gists_url":"https://api.github.com/users/Seraphiana/gists{/gist_id}","starred_url":"https://api.github.com/users/Seraphiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seraphiana/subscriptions","organizations_url":"https://api.github.com/users/Seraphiana/orgs","repos_url":"https://api.github.com/users/Seraphiana/repos","events_url":"https://api.github.com/users/Seraphiana/events{/privacy}","received_events_url":"https://api.github.com/users/Seraphiana/received_events","type":"User","site_admin":false},"body":"- Deprecated 'format' and replaced it with 'schema_name' and 'document_type'\r\n- Format 'public_updated_at' to rfc3339 string, as this is the default\r\nrequirement of content-schema validation.\r\n\r\n[Trello Card](https://trello.com/c/HnpJ2PQf/147-create-missing-schema-for-finder-email-signup-medium),\r\n\r\n[Depends On](https://github.com/alphagov/govuk-content-schemas/pull/327)","created_at":"2016-06-16T16:30:44Z","updated_at":"2016-06-17T12:58:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f0c4868fbea9b6d942cf8f961bdbf6a95e5e0ff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803/commits","review_comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803/comments","review_comment_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/803/comments","statuses_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/447d722eff685ff9437322d995a1938cf0fd2419","head":{"label":"alphagov:add-schema-finder-email-signup","ref":"add-schema-finder-email-signup","sha":"447d722eff685ff9437322d995a1938cf0fd2419","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":55792443,"name":"specialist-publisher-rebuild","full_name":"alphagov/specialist-publisher-rebuild","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/specialist-publisher-rebuild","description":"Publishing app for specialist documents and manuals on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild","forks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/forks","keys_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/teams","hooks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/hooks","issue_events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/events","assignees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/tags","blobs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/languages","stargazers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/stargazers","contributors_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contributors","subscribers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscribers","subscription_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscription","commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/merges","archive_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/downloads","issues_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/deployments","created_at":"2016-04-08T16:10:36Z","updated_at":"2016-04-13T14:31:44Z","pushed_at":"2016-06-16T16:30:44Z","git_url":"git://github.com/alphagov/specialist-publisher-rebuild.git","ssh_url":"git@github.com:alphagov/specialist-publisher-rebuild.git","clone_url":"https://github.com/alphagov/specialist-publisher-rebuild.git","svn_url":"https://github.com/alphagov/specialist-publisher-rebuild","homepage":"","size":5539,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"d89fbec7a0c3b9ccbbda083a5c1001cf4d70d549","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":55792443,"name":"specialist-publisher-rebuild","full_name":"alphagov/specialist-publisher-rebuild","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/specialist-publisher-rebuild","description":"Publishing app for specialist documents and manuals on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild","forks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/forks","keys_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/teams","hooks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/hooks","issue_events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/events","assignees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/tags","blobs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/languages","stargazers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/stargazers","contributors_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contributors","subscribers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscribers","subscription_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscription","commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/merges","archive_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/downloads","issues_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/deployments","created_at":"2016-04-08T16:10:36Z","updated_at":"2016-04-13T14:31:44Z","pushed_at":"2016-06-16T16:30:44Z","git_url":"git://github.com/alphagov/specialist-publisher-rebuild.git","ssh_url":"git@github.com:alphagov/specialist-publisher-rebuild.git","clone_url":"https://github.com/alphagov/specialist-publisher-rebuild.git","svn_url":"https://github.com/alphagov/specialist-publisher-rebuild","homepage":"","size":5539,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803"},"html":{"href":"https://github.com/alphagov/specialist-publisher-rebuild/pull/803"},"issue":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/803"},"comments":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/803/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/803/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/447d722eff685ff9437322d995a1938cf0fd2419"}}}}
{"actor":{"display_login":"tuzz"}}