{"action":"closed","number":8849,"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/8849","id":173563434,"node_id":"MDExOlB1bGxSZXF1ZXN0MTczNTYzNDM0","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/8849","diff_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/8849.diff","patch_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/8849.patch","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/8849","number":8849,"state":"closed","locked":false,"title":"Fixes AccountService unit tests to avoid modifying NSUserDefaults.","user":{"login":"diegoreymendez","id":1836005,"node_id":"MDQ6VXNlcjE4MzYwMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1836005?v=4","gravatar_id":"","url":"https://api.github.com/users/diegoreymendez","html_url":"https://github.com/diegoreymendez","followers_url":"https://api.github.com/users/diegoreymendez/followers","following_url":"https://api.github.com/users/diegoreymendez/following{/other_user}","gists_url":"https://api.github.com/users/diegoreymendez/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoreymendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoreymendez/subscriptions","organizations_url":"https://api.github.com/users/diegoreymendez/orgs","repos_url":"https://api.github.com/users/diegoreymendez/repos","events_url":"https://api.github.com/users/diegoreymendez/events{/privacy}","received_events_url":"https://api.github.com/users/diegoreymendez/received_events","type":"User","site_admin":false},"body":"### Description:\r\n\r\nRunning the unit tests would modify the default WP.com account in NSUserDefaults.  That would result in the list of blog being empty when pressing the \"Edit\" button as shown below.\r\n\r\nThis PR fixes the unit tests so that they don't affect or persist any changes to the defaults.\r\n\r\n### Screenshots:\r\n\r\nAn example showing the list of blogs broken after running our unit tests:\r\n\r\n![emptybloglist](https://user-images.githubusercontent.com/1836005/37116100-ef380bfe-222b-11e8-832a-4b4729c4470b.gif)\r\n\r\nAn example showing the Me section broken after running our unit tests:\r\n\r\nWORK-IN-PROGRESS\r\n\r\n### Testing:\r\n\r\n**Test 1:**\r\n\r\n- Erase your simulator content and settings.\r\n- Run the app.\r\n- Log in manually.\r\n- Go to the list of Blogs and tap \"Edit\".  Make sure the editable list isn't empty.\r\n- Stop the App and run the unit tests.\r\n- Once done, run the app again and go to the Blogs list.\r\n- Tap \"Edit\" and make sure the list isn't empty.\r\n\r\n**Test 2:**\r\n\r\n- Erase your simulator content and settings.\r\n- Run the app.\r\n- Log in manually.\r\n- Stop the App and run the unit tests.\r\n- Once done, run the app again and go to the Me section.\r\n- Make sure your account is still logged in.\r\n\r\nFeel free to repeat the process in `develop` to reproduce the original issue.","created_at":"2018-03-07T20:22:43Z","updated_at":"2018-12-19T13:07:10Z","closed_at":"2018-12-19T13:07:10Z","merged_at":null,"merge_commit_sha":"a84bfa6a4ed20fb7ff90b4c7e5757d9bd5f49c7d","assignee":{"login":"diegoreymendez","id":1836005,"node_id":"MDQ6VXNlcjE4MzYwMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1836005?v=4","gravatar_id":"","url":"https://api.github.com/users/diegoreymendez","html_url":"https://github.com/diegoreymendez","followers_url":"https://api.github.com/users/diegoreymendez/followers","following_url":"https://api.github.com/users/diegoreymendez/following{/other_user}","gists_url":"https://api.github.com/users/diegoreymendez/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoreymendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoreymendez/subscriptions","organizations_url":"https://api.github.com/users/diegoreymendez/orgs","repos_url":"https://api.github.com/users/diegoreymendez/repos","events_url":"https://api.github.com/users/diegoreymendez/events{/privacy}","received_events_url":"https://api.github.com/users/diegoreymendez/received_events","type":"User","site_admin":false},"assignees":[{"login":"diegoreymendez","id":1836005,"node_id":"MDQ6VXNlcjE4MzYwMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1836005?v=4","gravatar_id":"","url":"https://api.github.com/users/diegoreymendez","html_url":"https://github.com/diegoreymendez","followers_url":"https://api.github.com/users/diegoreymendez/followers","following_url":"https://api.github.com/users/diegoreymendez/following{/other_user}","gists_url":"https://api.github.com/users/diegoreymendez/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoreymendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoreymendez/subscriptions","organizations_url":"https://api.github.com/users/diegoreymendez/orgs","repos_url":"https://api.github.com/users/diegoreymendez/repos","events_url":"https://api.github.com/users/diegoreymendez/events{/privacy}","received_events_url":"https://api.github.com/users/diegoreymendez/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"jleandroperez","id":1195260,"node_id":"MDQ6VXNlcjExOTUyNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1195260?v=4","gravatar_id":"","url":"https://api.github.com/users/jleandroperez","html_url":"https://github.com/jleandroperez","followers_url":"https://api.github.com/users/jleandroperez/followers","following_url":"https://api.github.com/users/jleandroperez/following{/other_user}","gists_url":"https://api.github.com/users/jleandroperez/gists{/gist_id}","starred_url":"https://api.github.com/users/jleandroperez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleandroperez/subscriptions","organizations_url":"https://api.github.com/users/jleandroperez/orgs","repos_url":"https://api.github.com/users/jleandroperez/repos","events_url":"https://api.github.com/users/jleandroperez/events{/privacy}","received_events_url":"https://api.github.com/users/jleandroperez/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":216949618,"node_id":"MDU6TGFiZWwyMTY5NDk2MTg=","url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels/[Status]%20DO%20NOT%20MERGE","name":"[Status] DO NOT MERGE","color":"bfdadc","default":false},{"id":214026842,"node_id":"MDU6TGFiZWwyMTQwMjY4NDI=","url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels/[Status]%20Not%20Ready%20for%20Review","name":"[Status] Not Ready for Review","color":"fef2c0","default":false},{"id":291116977,"node_id":"MDU6TGFiZWwyOTExMTY5Nzc=","url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels/[Type]%20Task","name":"[Type] Task","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/8849/commits","review_comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/8849/comments","review_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/8849/comments","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/d953e0be3532210ef82211991fac0914c0be08ea","head":{"label":"wordpress-mobile:try/fix-unit-tests-removing-default-account-uuid","ref":"try/fix-unit-tests-removing-default-account-uuid","sha":"d953e0be3532210ef82211991fac0914c0be08ea","user":{"login":"wordpress-mobile","id":1306301,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDYzMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/1306301?v=4","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":8859285,"node_id":"MDEwOlJlcG9zaXRvcnk4ODU5Mjg1","name":"WordPress-iOS","full_name":"wordpress-mobile/WordPress-iOS","private":false,"owner":{"login":"wordpress-mobile","id":1306301,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDYzMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/1306301?v=4","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wordpress-mobile/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/deployments","created_at":"2013-03-18T16:59:33Z","updated_at":"2018-12-19T08:19:41Z","pushed_at":"2018-12-19T11:46:01Z","git_url":"git://github.com/wordpress-mobile/WordPress-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPress-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":532844,"stargazers_count":2476,"watchers_count":2476,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":843,"mirror_url":null,"archived":false,"open_issues_count":567,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":843,"open_issues":567,"watchers":2476,"default_branch":"develop"}},"base":{"label":"wordpress-mobile:develop","ref":"develop","sha":"e8d61baabc4a1363154f5df4ebc68406c2c7b853","user":{"login":"wordpress-mobile","id":1306301,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDYzMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/1306301?v=4","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":8859285,"node_id":"MDEwOlJlcG9zaXRvcnk4ODU5Mjg1","name":"WordPress-iOS","full_name":"wordpress-mobile/WordPress-iOS","private":false,"owner":{"login":"wordpress-mobile","id":1306301,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDYzMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/1306301?v=4","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wordpress-mobile/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/deployments","created_at":"2013-03-18T16:59:33Z","updated_at":"2018-12-19T08:19:41Z","pushed_at":"2018-12-19T11:46:01Z","git_url":"git://github.com/wordpress-mobile/WordPress-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPress-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":532844,"stargazers_count":2476,"watchers_count":2476,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":843,"mirror_url":null,"archived":false,"open_issues_count":567,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":843,"open_issues":567,"watchers":2476,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/8849"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-iOS/pull/8849"},"issue":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/8849"},"comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/8849/comments"},"review_comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/8849/comments"},"review_comment":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/8849/commits"},"statuses":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/d953e0be3532210ef82211991fac0914c0be08ea"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":4,"review_comments":7,"maintainer_can_modify":false,"commits":10000,"additions":315396,"deletions":205006,"changed_files":5640}}
{"actor":{"display_login":"diegoreymendez"}}