     refute Repo.get(User, coordinator.id)
   end
 
+  test "does not delete chosen resource when does not exist", %{conn: conn} do
+    conn = delete conn, coordinator_path(conn, :delete, "-1")
+    assert redirected_to(conn) == coordinator_path(conn, :index)
+    conn = get conn, coordinator_path(conn, :index)
+    assert html_response(conn, 200) =~ "Coordinator was not found."
+  end
+
   test "renders form for new resources", %{conn: conn} do
     conn = get conn, coordinator_path(conn, :new)
     assert html_response(conn, 200) =~ "New coordinator"


    conn = get volunteer_conn, coordinator_path(volunteer_conn, :new)
    assert html_response(conn, 403)
  end

  test "create coordinator for coordinator user", %{conn: conn} do

    coordinator = insert(:coordinator, %{name: "Foo", family_name: "Bar"})
    conn = get conn, coordinator_path(conn, :edit, coordinator)
    assert html_response(conn, 200) =~ "Foo Bar"
  end

  test "does not updates if the resource does not exist", %{conn: conn} do
    conn = put conn, coordinator_path(conn, :update, -1), %{"user" => %{"email" => "foo@bar.com"}}
    assert html_response(conn, 404)
  end

  test "updates chosen resource and redirects when data is valid", %{conn: conn} do
