{"action":"created","comment":{"url":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/35442753","id":35442753,"diff_hunk":"@@ -250,4 +250,22 @@ public function test_add_extra_api_taxonomy_arguments() {\n \t\t$this->assertEquals( 'tag', $taxonomy->rest_base );\n \t\t$this->assertEquals( 'WP_REST_Terms_Controller', $taxonomy->rest_controller_class );\n \t}\n+\n+\t/**\n+\t * The get_rest_url function should return a URL consistently terminated with a \"/\",\n+\t * whether the blog is configured with pretty permalink support or not.\n+\t */\n+\tpublic function test_rest_url_generation() {\n+\t\t$original_structure = get_option( 'permalink_structure' );\n+\n+\t\t// In pretty permalinks case, we expect a path of wp-json/ with no query\n+\t\tupdate_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' );\n+\t\t$this->assertEquals( \"http://example.org/wp-json/\", get_rest_url() );","path":"tests/test-rest-plugin.php","position":14,"original_position":14,"commit_id":"616b386840beeaba69c0ff3da5ef2ab79e93a734","original_commit_id":"616b386840beeaba69c0ff3da5ef2ab79e93a734","user":{"login":"rmccue","id":21655,"avatar_url":"https://avatars.githubusercontent.com/u/21655?v=3","gravatar_id":"","url":"https://api.github.com/users/rmccue","html_url":"https://github.com/rmccue","followers_url":"https://api.github.com/users/rmccue/followers","following_url":"https://api.github.com/users/rmccue/following{/other_user}","gists_url":"https://api.github.com/users/rmccue/gists{/gist_id}","starred_url":"https://api.github.com/users/rmccue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmccue/subscriptions","organizations_url":"https://api.github.com/users/rmccue/orgs","repos_url":"https://api.github.com/users/rmccue/repos","events_url":"https://api.github.com/users/rmccue/events{/privacy}","received_events_url":"https://api.github.com/users/rmccue/received_events","type":"User","site_admin":false},"body":"This string should be single-quoted (causing tests to fail with double).","created_at":"2015-07-24T17:03:58Z","updated_at":"2015-07-24T17:03:58Z","html_url":"https://github.com/WP-API/WP-API/pull/1426#discussion_r35442753","pull_request_url":"https://api.github.com/repos/WP-API/WP-API/pulls/1426","_links":{"self":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/35442753"},"html":{"href":"https://github.com/WP-API/WP-API/pull/1426#discussion_r35442753"},"pull_request":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/1426"}}},"pull_request":{"url":"https://api.github.com/repos/WP-API/WP-API/pulls/1426","id":40788161,"html_url":"https://github.com/WP-API/WP-API/pull/1426","diff_url":"https://github.com/WP-API/WP-API/pull/1426.diff","patch_url":"https://github.com/WP-API/WP-API/pull/1426.patch","issue_url":"https://api.github.com/repos/WP-API/WP-API/issues/1426","number":1426,"state":"open","locked":false,"title":"Ensure the REST API URL has a trailing slash","user":{"login":"danielpunkass","id":14606,"avatar_url":"https://avatars.githubusercontent.com/u/14606?v=3","gravatar_id":"","url":"https://api.github.com/users/danielpunkass","html_url":"https://github.com/danielpunkass","followers_url":"https://api.github.com/users/danielpunkass/followers","following_url":"https://api.github.com/users/danielpunkass/following{/other_user}","gists_url":"https://api.github.com/users/danielpunkass/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpunkass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpunkass/subscriptions","organizations_url":"https://api.github.com/users/danielpunkass/orgs","repos_url":"https://api.github.com/users/danielpunkass/repos","events_url":"https://api.github.com/users/danielpunkass/events{/privacy}","received_events_url":"https://api.github.com/users/danielpunkass/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-24T15:45:07Z","updated_at":"2015-07-24T17:03:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7e6c5898b69dfe1051476d133f75e72c7ea8a5b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WP-API/WP-API/pulls/1426/commits","review_comments_url":"https://api.github.com/repos/WP-API/WP-API/pulls/1426/comments","review_comment_url":"https://api.github.com/repos/WP-API/WP-API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/1426/comments","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/616b386840beeaba69c0ff3da5ef2ab79e93a734","head":{"label":"danielpunkass:fix-rest-url","ref":"fix-rest-url","sha":"616b386840beeaba69c0ff3da5ef2ab79e93a734","user":{"login":"danielpunkass","id":14606,"avatar_url":"https://avatars.githubusercontent.com/u/14606?v=3","gravatar_id":"","url":"https://api.github.com/users/danielpunkass","html_url":"https://github.com/danielpunkass","followers_url":"https://api.github.com/users/danielpunkass/followers","following_url":"https://api.github.com/users/danielpunkass/following{/other_user}","gists_url":"https://api.github.com/users/danielpunkass/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpunkass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpunkass/subscriptions","organizations_url":"https://api.github.com/users/danielpunkass/orgs","repos_url":"https://api.github.com/users/danielpunkass/repos","events_url":"https://api.github.com/users/danielpunkass/events{/privacy}","received_events_url":"https://api.github.com/users/danielpunkass/received_events","type":"User","site_admin":false},"repo":{"id":39467714,"name":"WP-API","full_name":"danielpunkass/WP-API","owner":{"login":"danielpunkass","id":14606,"avatar_url":"https://avatars.githubusercontent.com/u/14606?v=3","gravatar_id":"","url":"https://api.github.com/users/danielpunkass","html_url":"https://github.com/danielpunkass","followers_url":"https://api.github.com/users/danielpunkass/followers","following_url":"https://api.github.com/users/danielpunkass/following{/other_user}","gists_url":"https://api.github.com/users/danielpunkass/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpunkass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpunkass/subscriptions","organizations_url":"https://api.github.com/users/danielpunkass/orgs","repos_url":"https://api.github.com/users/danielpunkass/repos","events_url":"https://api.github.com/users/danielpunkass/events{/privacy}","received_events_url":"https://api.github.com/users/danielpunkass/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielpunkass/WP-API","description":"WP REST API - a JSON-based REST API for WordPress.","fork":true,"url":"https://api.github.com/repos/danielpunkass/WP-API","forks_url":"https://api.github.com/repos/danielpunkass/WP-API/forks","keys_url":"https://api.github.com/repos/danielpunkass/WP-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielpunkass/WP-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielpunkass/WP-API/teams","hooks_url":"https://api.github.com/repos/danielpunkass/WP-API/hooks","issue_events_url":"https://api.github.com/repos/danielpunkass/WP-API/issues/events{/number}","events_url":"https://api.github.com/repos/danielpunkass/WP-API/events","assignees_url":"https://api.github.com/repos/danielpunkass/WP-API/assignees{/user}","branches_url":"https://api.github.com/repos/danielpunkass/WP-API/branches{/branch}","tags_url":"https://api.github.com/repos/danielpunkass/WP-API/tags","blobs_url":"https://api.github.com/repos/danielpunkass/WP-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielpunkass/WP-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielpunkass/WP-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielpunkass/WP-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielpunkass/WP-API/statuses/{sha}","languages_url":"https://api.github.com/repos/danielpunkass/WP-API/languages","stargazers_url":"https://api.github.com/repos/danielpunkass/WP-API/stargazers","contributors_url":"https://api.github.com/repos/danielpunkass/WP-API/contributors","subscribers_url":"https://api.github.com/repos/danielpunkass/WP-API/subscribers","subscription_url":"https://api.github.com/repos/danielpunkass/WP-API/subscription","commits_url":"https://api.github.com/repos/danielpunkass/WP-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielpunkass/WP-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielpunkass/WP-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielpunkass/WP-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielpunkass/WP-API/contents/{+path}","compare_url":"https://api.github.com/repos/danielpunkass/WP-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielpunkass/WP-API/merges","archive_url":"https://api.github.com/repos/danielpunkass/WP-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielpunkass/WP-API/downloads","issues_url":"https://api.github.com/repos/danielpunkass/WP-API/issues{/number}","pulls_url":"https://api.github.com/repos/danielpunkass/WP-API/pulls{/number}","milestones_url":"https://api.github.com/repos/danielpunkass/WP-API/milestones{/number}","notifications_url":"https://api.github.com/repos/danielpunkass/WP-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielpunkass/WP-API/labels{/name}","releases_url":"https://api.github.com/repos/danielpunkass/WP-API/releases{/id}","created_at":"2015-07-21T20:16:42Z","updated_at":"2015-07-21T20:16:42Z","pushed_at":"2015-07-24T15:59:24Z","git_url":"git://github.com/danielpunkass/WP-API.git","ssh_url":"git@github.com:danielpunkass/WP-API.git","clone_url":"https://github.com/danielpunkass/WP-API.git","svn_url":"https://github.com/danielpunkass/WP-API","homepage":"http://wp-api.org","size":4256,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"develop"}},"base":{"label":"WP-API:develop","ref":"develop","sha":"33cc8a60c467f97336bb1e9b80ec8abf929f37e1","user":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"repo":{"id":10420996,"name":"WP-API","full_name":"WP-API/WP-API","owner":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WP-API/WP-API","description":"WP REST API - a JSON-based REST API for WordPress.","fork":false,"url":"https://api.github.com/repos/WP-API/WP-API","forks_url":"https://api.github.com/repos/WP-API/WP-API/forks","keys_url":"https://api.github.com/repos/WP-API/WP-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WP-API/WP-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WP-API/WP-API/teams","hooks_url":"https://api.github.com/repos/WP-API/WP-API/hooks","issue_events_url":"https://api.github.com/repos/WP-API/WP-API/issues/events{/number}","events_url":"https://api.github.com/repos/WP-API/WP-API/events","assignees_url":"https://api.github.com/repos/WP-API/WP-API/assignees{/user}","branches_url":"https://api.github.com/repos/WP-API/WP-API/branches{/branch}","tags_url":"https://api.github.com/repos/WP-API/WP-API/tags","blobs_url":"https://api.github.com/repos/WP-API/WP-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WP-API/WP-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WP-API/WP-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/WP-API/WP-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/{sha}","languages_url":"https://api.github.com/repos/WP-API/WP-API/languages","stargazers_url":"https://api.github.com/repos/WP-API/WP-API/stargazers","contributors_url":"https://api.github.com/repos/WP-API/WP-API/contributors","subscribers_url":"https://api.github.com/repos/WP-API/WP-API/subscribers","subscription_url":"https://api.github.com/repos/WP-API/WP-API/subscription","commits_url":"https://api.github.com/repos/WP-API/WP-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/WP-API/WP-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/WP-API/WP-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/WP-API/WP-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/WP-API/WP-API/contents/{+path}","compare_url":"https://api.github.com/repos/WP-API/WP-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WP-API/WP-API/merges","archive_url":"https://api.github.com/repos/WP-API/WP-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WP-API/WP-API/downloads","issues_url":"https://api.github.com/repos/WP-API/WP-API/issues{/number}","pulls_url":"https://api.github.com/repos/WP-API/WP-API/pulls{/number}","milestones_url":"https://api.github.com/repos/WP-API/WP-API/milestones{/number}","notifications_url":"https://api.github.com/repos/WP-API/WP-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WP-API/WP-API/labels{/name}","releases_url":"https://api.github.com/repos/WP-API/WP-API/releases{/id}","created_at":"2013-06-01T10:52:43Z","updated_at":"2015-07-24T15:36:58Z","pushed_at":"2015-07-24T16:51:33Z","git_url":"git://github.com/WP-API/WP-API.git","ssh_url":"git@github.com:WP-API/WP-API.git","clone_url":"https://github.com/WP-API/WP-API.git","svn_url":"https://github.com/WP-API/WP-API","homepage":"http://wp-api.org","size":10752,"stargazers_count":2250,"watchers_count":2250,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":398,"mirror_url":null,"open_issues_count":167,"forks":398,"open_issues":167,"watchers":2250,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/1426"},"html":{"href":"https://github.com/WP-API/WP-API/pull/1426"},"issue":{"href":"https://api.github.com/repos/WP-API/WP-API/issues/1426"},"comments":{"href":"https://api.github.com/repos/WP-API/WP-API/issues/1426/comments"},"review_comments":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/1426/comments"},"review_comment":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/1426/commits"},"statuses":{"href":"https://api.github.com/repos/WP-API/WP-API/statuses/616b386840beeaba69c0ff3da5ef2ab79e93a734"}}}}