   test "shows chosen resource", %{conn: conn} do
     badge = Repo.insert! valid_badge
 
-    conn = get_authenticated(conn, "/badges/coverage")
+    conn = get(conn, "/badges/coverage", token: valid_read_token)
 
     assert json_response(conn, 200)["data"] == %{
       "id" => badge.id,

  test "renders SVG when it's available", %{conn: conn} do
    Repo.insert! valid_badge_with_svg

    conn = get_authenticated(conn, "/badges/coverage.svg")

    assert conn.resp_body == "<svg />"
    assert get_header(conn, "content-type") == "image/svg+xml"

    put_req_header(conn, "authorization", header_content)
  end

  defp valid_read_token do
    Application.get_env(:badging, :read_auth_token) ||
      raise "read_auth_token not set"
  end
end
