       params = create_input_params("user", "user bulk creation", "Aname,AFamile,Anickname,a@a.com,Student")
       conn = post conn, bulk_path(conn, :create, params)
       assert html_response(conn, 200)
-      assert conn.private.phoenix_flash == %{"error" => "email has already been taken"}
+      assert get_flash(conn, "error") == "email has already been taken"
       refute Repo.get_by(User, name: "Aname", family_name: "AFamile", role: "Student")
     end
 

      params = create_input_params("user", "user bulk creation", "Aname,AFamile,Anickname,a@a.com,unknown")
      conn = post conn, bulk_path(conn, :create, params)
      assert html_response(conn, 200)
      assert conn.private.phoenix_flash == %{"error" => "role is invalid"}
      refute Repo.get_by(User, name: "Aname", family_name: "AFamile", role: "Student")
    end


      params = create_input_params("invalid target", "user bulk creation", "Aname,AFamile,Anickname,a@a.com,Student")
      conn = post conn, bulk_path(conn, :create, params)
      assert html_response(conn, 200)
      assert get_flash(conn, "error") == "Something went wrong."
      refute Repo.get_by(User, name: "Aname", family_name: "AFamile", role: "Student")
    end
  end
