   end
 
   test "updates and renders chosen resource when data is valid", %{conn: conn} do
-    Repo.insert! valid_badge
+    Repo.insert! valid_badge()
 
     conn =
       conn

  end

  test "renders 404 when SVG is not available", %{conn: conn} do
    Repo.insert! valid_badge

    assert_error_sent 404, fn ->
      get(conn, "/badges/coverage.svg", token: valid_token(:read))

  end

  test "renders 403 when not authed", %{conn: conn} do
    Repo.insert! valid_badge_with_svg()

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

