{"action":"opened","issue":{"url":"https://api.github.com/repos/nsarno/knock/issues/174","repository_url":"https://api.github.com/repos/nsarno/knock","labels_url":"https://api.github.com/repos/nsarno/knock/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/nsarno/knock/issues/174/comments","events_url":"https://api.github.com/repos/nsarno/knock/issues/174/events","html_url":"https://github.com/nsarno/knock/issues/174","id":239679602,"number":174,"title":"Test example no longer working","user":{"login":"kiesia","id":783612,"avatar_url":"https://avatars1.githubusercontent.com/u/783612?v=3","gravatar_id":"","url":"https://api.github.com/users/kiesia","html_url":"https://github.com/kiesia","followers_url":"https://api.github.com/users/kiesia/followers","following_url":"https://api.github.com/users/kiesia/following{/other_user}","gists_url":"https://api.github.com/users/kiesia/gists{/gist_id}","starred_url":"https://api.github.com/users/kiesia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiesia/subscriptions","organizations_url":"https://api.github.com/users/kiesia/orgs","repos_url":"https://api.github.com/users/kiesia/repos","events_url":"https://api.github.com/users/kiesia/events{/privacy}","received_events_url":"https://api.github.com/users/kiesia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-30T05:18:23Z","updated_at":"2017-06-30T05:18:23Z","closed_at":null,"body":"I just upgraded to Rails 5.1.2 (from 5.0.1) and discovered that it's no longer possible to pass in `headers: {}` into get/patch/post/etc request test helpers. So the example in the README:\r\n\r\n```\r\nget secured_resources_url, headers: authenticated_header\r\n```\r\n no longer works. I did a bit of digging and found a couple of solutions [here](https://github.com/rspec/rspec-rails/issues/1655). I ended up reimplementing my tests like this:\r\n\r\n```\r\nrequest.headers.merge!('HTTP_AUTHORIZATION' => retrieve_access_token(user))\r\nget path, params: params\r\n``` \r\nI'm happy to submit a PR if you think that's the best way to go with tests. 🙂 "}}
{"actor":{"display_login":"kiesia"}}