{"action":"created","comment":{"url":"https://api.github.com/repos/moneyadviceservice/cms/pulls/comments/23164096","id":23164096,"diff_hunk":"@@ -42,9 +43,42 @@\n \n     end\n \n+    context 'related links' do\n+      let(:related_links) do\n+        subject.related_content[:related_links].as_json\n+      end\n+\n+      before do\n+        allow(article)\n+        .to receive(:related_links)\n+        .with(3)\n+        .and_return(pages)\n+      end\n+\n+      context 'when has most related articles in english' do\n+        let(:pages) do\n+          [\n+            build(:page, slug: 'first-article', label: 'First Article'),\n+            build(:page, slug: 'second-article', label: 'Second Article')\n+          ]\n+        end\n+\n+        before do\n+          site.label = 'en'\n+        end\n+\n+        it 'returns english related links' do\n+          expect(related_links).to eq([\n+            { title: 'First Article', path: '/en/articles/first-article' },\n+            { title: 'Second Article', path: '/en/articles/second-article' }\n+          ])\n+        end\n+      end","path":"spec/serializers/page_serializer_spec.rb","position":57,"original_position":57,"commit_id":"5d9977a428c8790a665dc5fb75f5e66e545624d3","original_commit_id":"5d9977a428c8790a665dc5fb75f5e66e545624d3","user":{"login":"tomas-stefano","id":27509,"avatar_url":"https://avatars.githubusercontent.com/u/27509?v=3","gravatar_id":"","url":"https://api.github.com/users/tomas-stefano","html_url":"https://github.com/tomas-stefano","followers_url":"https://api.github.com/users/tomas-stefano/followers","following_url":"https://api.github.com/users/tomas-stefano/following{/other_user}","gists_url":"https://api.github.com/users/tomas-stefano/gists{/gist_id}","starred_url":"https://api.github.com/users/tomas-stefano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomas-stefano/subscriptions","organizations_url":"https://api.github.com/users/tomas-stefano/orgs","repos_url":"https://api.github.com/users/tomas-stefano/repos","events_url":"https://api.github.com/users/tomas-stefano/events{/privacy}","received_events_url":"https://api.github.com/users/tomas-stefano/received_events","type":"User","site_admin":false},"body":"What happen when most related articles is not english? Is there a spec needed here?","created_at":"2015-01-19T14:59:27Z","updated_at":"2015-01-19T14:59:27Z","html_url":"https://github.com/moneyadviceservice/cms/pull/131#discussion_r23164096","pull_request_url":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131","_links":{"self":{"href":"https://api.github.com/repos/moneyadviceservice/cms/pulls/comments/23164096"},"html":{"href":"https://github.com/moneyadviceservice/cms/pull/131#discussion_r23164096"},"pull_request":{"href":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131"}}},"pull_request":{"url":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131","id":27429893,"html_url":"https://github.com/moneyadviceservice/cms/pull/131","diff_url":"https://github.com/moneyadviceservice/cms/pull/131.diff","patch_url":"https://github.com/moneyadviceservice/cms/pull/131.patch","issue_url":"https://api.github.com/repos/moneyadviceservice/cms/issues/131","number":131,"state":"open","locked":false,"title":"Exposing related_links for frontend","user":{"login":"JiggyPete","id":67151,"avatar_url":"https://avatars.githubusercontent.com/u/67151?v=3","gravatar_id":"","url":"https://api.github.com/users/JiggyPete","html_url":"https://github.com/JiggyPete","followers_url":"https://api.github.com/users/JiggyPete/followers","following_url":"https://api.github.com/users/JiggyPete/following{/other_user}","gists_url":"https://api.github.com/users/JiggyPete/gists{/gist_id}","starred_url":"https://api.github.com/users/JiggyPete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiggyPete/subscriptions","organizations_url":"https://api.github.com/users/JiggyPete/orgs","repos_url":"https://api.github.com/users/JiggyPete/repos","events_url":"https://api.github.com/users/JiggyPete/events{/privacy}","received_events_url":"https://api.github.com/users/JiggyPete/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-15T14:00:42Z","updated_at":"2015-01-19T14:59:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4c63fcbff9c7ef439bdbbcc2bbffbe303795505","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131/commits","review_comments_url":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131/comments","review_comment_url":"https://api.github.com/repos/moneyadviceservice/cms/pulls/comments/{number}","comments_url":"https://api.github.com/repos/moneyadviceservice/cms/issues/131/comments","statuses_url":"https://api.github.com/repos/moneyadviceservice/cms/statuses/5d9977a428c8790a665dc5fb75f5e66e545624d3","head":{"label":"moneyadviceservice:adding_related_links_for_frontend","ref":"adding_related_links_for_frontend","sha":"5d9977a428c8790a665dc5fb75f5e66e545624d3","user":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"repo":{"id":21238354,"name":"cms","full_name":"moneyadviceservice/cms","owner":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moneyadviceservice/cms","description":"The MAS CMS","fork":false,"url":"https://api.github.com/repos/moneyadviceservice/cms","forks_url":"https://api.github.com/repos/moneyadviceservice/cms/forks","keys_url":"https://api.github.com/repos/moneyadviceservice/cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneyadviceservice/cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneyadviceservice/cms/teams","hooks_url":"https://api.github.com/repos/moneyadviceservice/cms/hooks","issue_events_url":"https://api.github.com/repos/moneyadviceservice/cms/issues/events{/number}","events_url":"https://api.github.com/repos/moneyadviceservice/cms/events","assignees_url":"https://api.github.com/repos/moneyadviceservice/cms/assignees{/user}","branches_url":"https://api.github.com/repos/moneyadviceservice/cms/branches{/branch}","tags_url":"https://api.github.com/repos/moneyadviceservice/cms/tags","blobs_url":"https://api.github.com/repos/moneyadviceservice/cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneyadviceservice/cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneyadviceservice/cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneyadviceservice/cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneyadviceservice/cms/statuses/{sha}","languages_url":"https://api.github.com/repos/moneyadviceservice/cms/languages","stargazers_url":"https://api.github.com/repos/moneyadviceservice/cms/stargazers","contributors_url":"https://api.github.com/repos/moneyadviceservice/cms/contributors","subscribers_url":"https://api.github.com/repos/moneyadviceservice/cms/subscribers","subscription_url":"https://api.github.com/repos/moneyadviceservice/cms/subscription","commits_url":"https://api.github.com/repos/moneyadviceservice/cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneyadviceservice/cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneyadviceservice/cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneyadviceservice/cms/issues/comments/{number}","contents_url":"https://api.github.com/repos/moneyadviceservice/cms/contents/{+path}","compare_url":"https://api.github.com/repos/moneyadviceservice/cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneyadviceservice/cms/merges","archive_url":"https://api.github.com/repos/moneyadviceservice/cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneyadviceservice/cms/downloads","issues_url":"https://api.github.com/repos/moneyadviceservice/cms/issues{/number}","pulls_url":"https://api.github.com/repos/moneyadviceservice/cms/pulls{/number}","milestones_url":"https://api.github.com/repos/moneyadviceservice/cms/milestones{/number}","notifications_url":"https://api.github.com/repos/moneyadviceservice/cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneyadviceservice/cms/labels{/name}","releases_url":"https://api.github.com/repos/moneyadviceservice/cms/releases{/id}","created_at":"2014-06-26T11:26:25Z","updated_at":"2015-01-16T12:17:18Z","pushed_at":"2015-01-19T14:56:28Z","git_url":"git://github.com/moneyadviceservice/cms.git","ssh_url":"git@github.com:moneyadviceservice/cms.git","clone_url":"https://github.com/moneyadviceservice/cms.git","svn_url":"https://github.com/moneyadviceservice/cms","homepage":null,"size":11352,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"moneyadviceservice:master","ref":"master","sha":"0e57bc62dc77c154683aa70038a8ebd3057d4ee5","user":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"repo":{"id":21238354,"name":"cms","full_name":"moneyadviceservice/cms","owner":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moneyadviceservice/cms","description":"The MAS CMS","fork":false,"url":"https://api.github.com/repos/moneyadviceservice/cms","forks_url":"https://api.github.com/repos/moneyadviceservice/cms/forks","keys_url":"https://api.github.com/repos/moneyadviceservice/cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneyadviceservice/cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneyadviceservice/cms/teams","hooks_url":"https://api.github.com/repos/moneyadviceservice/cms/hooks","issue_events_url":"https://api.github.com/repos/moneyadviceservice/cms/issues/events{/number}","events_url":"https://api.github.com/repos/moneyadviceservice/cms/events","assignees_url":"https://api.github.com/repos/moneyadviceservice/cms/assignees{/user}","branches_url":"https://api.github.com/repos/moneyadviceservice/cms/branches{/branch}","tags_url":"https://api.github.com/repos/moneyadviceservice/cms/tags","blobs_url":"https://api.github.com/repos/moneyadviceservice/cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneyadviceservice/cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneyadviceservice/cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneyadviceservice/cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneyadviceservice/cms/statuses/{sha}","languages_url":"https://api.github.com/repos/moneyadviceservice/cms/languages","stargazers_url":"https://api.github.com/repos/moneyadviceservice/cms/stargazers","contributors_url":"https://api.github.com/repos/moneyadviceservice/cms/contributors","subscribers_url":"https://api.github.com/repos/moneyadviceservice/cms/subscribers","subscription_url":"https://api.github.com/repos/moneyadviceservice/cms/subscription","commits_url":"https://api.github.com/repos/moneyadviceservice/cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneyadviceservice/cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneyadviceservice/cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneyadviceservice/cms/issues/comments/{number}","contents_url":"https://api.github.com/repos/moneyadviceservice/cms/contents/{+path}","compare_url":"https://api.github.com/repos/moneyadviceservice/cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneyadviceservice/cms/merges","archive_url":"https://api.github.com/repos/moneyadviceservice/cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneyadviceservice/cms/downloads","issues_url":"https://api.github.com/repos/moneyadviceservice/cms/issues{/number}","pulls_url":"https://api.github.com/repos/moneyadviceservice/cms/pulls{/number}","milestones_url":"https://api.github.com/repos/moneyadviceservice/cms/milestones{/number}","notifications_url":"https://api.github.com/repos/moneyadviceservice/cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneyadviceservice/cms/labels{/name}","releases_url":"https://api.github.com/repos/moneyadviceservice/cms/releases{/id}","created_at":"2014-06-26T11:26:25Z","updated_at":"2015-01-16T12:17:18Z","pushed_at":"2015-01-19T14:56:28Z","git_url":"git://github.com/moneyadviceservice/cms.git","ssh_url":"git@github.com:moneyadviceservice/cms.git","clone_url":"https://github.com/moneyadviceservice/cms.git","svn_url":"https://github.com/moneyadviceservice/cms","homepage":null,"size":11352,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131"},"html":{"href":"https://github.com/moneyadviceservice/cms/pull/131"},"issue":{"href":"https://api.github.com/repos/moneyadviceservice/cms/issues/131"},"comments":{"href":"https://api.github.com/repos/moneyadviceservice/cms/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/moneyadviceservice/cms/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/moneyadviceservice/cms/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/moneyadviceservice/cms/statuses/5d9977a428c8790a665dc5fb75f5e66e545624d3"}}}}