{"action":"created","issue":{"url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/issues/255","repository_url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid","labels_url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/issues/255/comments","events_url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/issues/255/events","html_url":"https://github.com/praekeltfoundation/mentorship-droid/pull/255","id":191516595,"number":255,"title":"Better api action tests","user":{"login":"justinvdm","id":1731223,"avatar_url":"https://avatars.githubusercontent.com/u/1731223?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvdm","html_url":"https://github.com/justinvdm","followers_url":"https://api.github.com/users/justinvdm/followers","following_url":"https://api.github.com/users/justinvdm/following{/other_user}","gists_url":"https://api.github.com/users/justinvdm/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvdm/subscriptions","organizations_url":"https://api.github.com/users/justinvdm/orgs","repos_url":"https://api.github.com/users/justinvdm/repos","events_url":"https://api.github.com/users/justinvdm/events{/privacy}","received_events_url":"https://api.github.com/users/justinvdm/received_events","type":"User","site_admin":false},"labels":[{"id":488095410,"url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/labels/cleanup","name":"cleanup","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-24T13:09:51Z","updated_at":"2016-11-28T10:57:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/pulls/255","html_url":"https://github.com/praekeltfoundation/mentorship-droid/pull/255","diff_url":"https://github.com/praekeltfoundation/mentorship-droid/pull/255.diff","patch_url":"https://github.com/praekeltfoundation/mentorship-droid/pull/255.patch"},"body":"At the moment, our tests for action creators that use the `apiAction()` helper aren't great.\n\nSince this helper does all the logic for making api requests and dispatching the relevant actions, any action creators using this helper basically become configuration more than anything.\n\nSince we still wanted to have these action creators tested, we ended up writing tests that basically looked identical to the implementation, which made for pretty useless tests (at the very least though, they were serving as some basic sort of regression tests).\n\nThis PR introduces a helper that actually checks that the correct actions were dispatched for a given action creator which makes api calls. The tests still look very similar to the implementation (both are basically just configuration code), but we are now actually testing that these action creators are doing what we expect them to, without caring about how their implementation actually looks."},"comment":{"url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/issues/comments/263242164","html_url":"https://github.com/praekeltfoundation/mentorship-droid/pull/255#issuecomment-263242164","issue_url":"https://api.github.com/repos/praekeltfoundation/mentorship-droid/issues/255","id":263242164,"user":{"login":"smn","id":1065,"avatar_url":"https://avatars.githubusercontent.com/u/1065?v=3","gravatar_id":"","url":"https://api.github.com/users/smn","html_url":"https://github.com/smn","followers_url":"https://api.github.com/users/smn/followers","following_url":"https://api.github.com/users/smn/following{/other_user}","gists_url":"https://api.github.com/users/smn/gists{/gist_id}","starred_url":"https://api.github.com/users/smn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smn/subscriptions","organizations_url":"https://api.github.com/users/smn/orgs","repos_url":"https://api.github.com/users/smn/repos","events_url":"https://api.github.com/users/smn/events{/privacy}","received_events_url":"https://api.github.com/users/smn/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T10:57:00Z","updated_at":"2016-11-28T10:57:00Z","body":":+1:"}}
{"actor":{"display_login":"smn"}}