{"action":"opened","issue":{"url":"https://api.github.com/repos/agourlay/cornichon/issues/31","labels_url":"https://api.github.com/repos/agourlay/cornichon/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/agourlay/cornichon/issues/31/comments","events_url":"https://api.github.com/repos/agourlay/cornichon/issues/31/events","html_url":"https://github.com/agourlay/cornichon/issues/31","id":126684000,"number":31,"title":"HttpService method should have an expected status code","user":{"login":"agourlay","id":606963,"avatar_url":"https://avatars.githubusercontent.com/u/606963?v=3","gravatar_id":"","url":"https://api.github.com/users/agourlay","html_url":"https://github.com/agourlay","followers_url":"https://api.github.com/users/agourlay/followers","following_url":"https://api.github.com/users/agourlay/following{/other_user}","gists_url":"https://api.github.com/users/agourlay/gists{/gist_id}","starred_url":"https://api.github.com/users/agourlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agourlay/subscriptions","organizations_url":"https://api.github.com/users/agourlay/orgs","repos_url":"https://api.github.com/users/agourlay/repos","events_url":"https://api.github.com/users/agourlay/events{/privacy}","received_events_url":"https://api.github.com/users/agourlay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/agourlay/cornichon/labels/feature","name":"feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-14T15:57:01Z","updated_at":"2016-01-14T15:57:01Z","closed_at":null,"body":"Can be used to fail faster.\r\n\r\n```\r\nAnd I create_user\r\nThen assert status_is(201)\r\n``` \r\n\r\nThe status assertion can be removed by adding the ```expects``` arg. to the POST. \r\n\r\n```\r\ndef create_user = effectful(\r\n    title = s\"create a user\",\r\n    effect =\r\n      s ⇒ \r\n        http.Post(\r\n          url = \"/users\",\r\n          payload = ???,\r\n          params = Seq.empty,\r\n          headers = Seq.empty,\r\n         expects = \"201\"\r\n        )(s)\r\n  )\r\n```\r\n\r\n\r\n"}}