     Repo.insert! valid_badge
 
     assert_error_sent 404, fn ->
-      get_authenticated(conn, "/badges/coverage.svg")
+      get(conn, "/badges/coverage.svg", token: valid_read_token)
     end
   end
 
   test "renders page not found when id is nonexistent", %{conn: conn} do
     assert_error_sent 404, fn ->
-      get_authenticated(conn, "/badges/dont_exist.svg")
+      get(conn, "/badges/dont_exist.svg", token: valid_read_token)
     end
   end
 

  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"

  end

  test "lists all entries on index", %{conn: conn} do
    conn = get(conn, "/badges", token: valid_read_token)

    assert json_response(conn, 200)["data"] == []
  end
