{"action":"created","issue":{"url":"https://api.github.com/repos/friendica/friendica/issues/5022","repository_url":"https://api.github.com/repos/friendica/friendica","labels_url":"https://api.github.com/repos/friendica/friendica/issues/5022/labels{/name}","comments_url":"https://api.github.com/repos/friendica/friendica/issues/5022/comments","events_url":"https://api.github.com/repos/friendica/friendica/issues/5022/events","html_url":"https://github.com/friendica/friendica/pull/5022","id":322011778,"number":5022,"title":" Add API tests ","user":{"login":"Rudloff","id":840125,"avatar_url":"https://avatars0.githubusercontent.com/u/840125?v=4","gravatar_id":"","url":"https://api.github.com/users/Rudloff","html_url":"https://github.com/Rudloff","followers_url":"https://api.github.com/users/Rudloff/followers","following_url":"https://api.github.com/users/Rudloff/following{/other_user}","gists_url":"https://api.github.com/users/Rudloff/gists{/gist_id}","starred_url":"https://api.github.com/users/Rudloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rudloff/subscriptions","organizations_url":"https://api.github.com/users/Rudloff/orgs","repos_url":"https://api.github.com/users/Rudloff/repos","events_url":"https://api.github.com/users/Rudloff/events{/privacy}","received_events_url":"https://api.github.com/users/Rudloff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-10T17:19:57Z","updated_at":"2018-05-10T18:08:01Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/friendica/friendica/pulls/5022","html_url":"https://github.com/friendica/friendica/pull/5022","diff_url":"https://github.com/friendica/friendica/pull/5022.diff","patch_url":"https://github.com/friendica/friendica/pull/5022.patch"},"body":"Hello,\r\n\r\nThis pull request adds tests for most of the API functions. (66 % of the code in `include/api.php` is executed by the tests.)\r\nThis will help catch regressions in new pull requests.\r\n\r\nI usually prefer to mock database functions but the API functions use them a lot so it would too much work. So instead, the tests use a test database with some predefined test data.\r\nThe database is emptied and recreated between each test so this makes the tests quite slow. (But you don't have to run them locally, you can use Travis.)"},"comment":{"url":"https://api.github.com/repos/friendica/friendica/issues/comments/388136483","html_url":"https://github.com/friendica/friendica/pull/5022#issuecomment-388136483","issue_url":"https://api.github.com/repos/friendica/friendica/issues/5022","id":388136483,"user":{"login":"MrPetovan","id":925415,"avatar_url":"https://avatars1.githubusercontent.com/u/925415?v=4","gravatar_id":"","url":"https://api.github.com/users/MrPetovan","html_url":"https://github.com/MrPetovan","followers_url":"https://api.github.com/users/MrPetovan/followers","following_url":"https://api.github.com/users/MrPetovan/following{/other_user}","gists_url":"https://api.github.com/users/MrPetovan/gists{/gist_id}","starred_url":"https://api.github.com/users/MrPetovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrPetovan/subscriptions","organizations_url":"https://api.github.com/users/MrPetovan/orgs","repos_url":"https://api.github.com/users/MrPetovan/repos","events_url":"https://api.github.com/users/MrPetovan/events{/privacy}","received_events_url":"https://api.github.com/users/MrPetovan/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T18:08:01Z","updated_at":"2018-05-10T18:08:01Z","author_association":"COLLABORATOR","body":"I know the tested file isn't broken up yet, but the goal is to separate `include/api.php` into multiple classes grouped by purpose. Is there any chance I can convince you to do the same for the ApiTest class as well?"}}
{"actor":{"display_login":"MrPetovan"}}