     assert html_response(conn, 200)
   end
 
+  test "does not create volunteer for coordinator user when data is wrong", %{conn: conn} do
+    conn = post conn, volunteer_path(conn, :create), %{"user" => %{"email" => ""}}
+    assert html_response(conn, 200) =~ "Something went wrong."
+  end
+
   test "does not create volunteer for non coordinator user", %{conn: _conn} do
     student_conn   = login_as(:student)
     teacher_conn   = login_as(:teacher)

    assert redirected_to(conn) == volunteer_path(conn, :index)
    refute Repo.get(User, volunteer.id)
  end

  test "renders form for new resources", %{conn: conn} do
    conn = get conn, volunteer_path(conn, :new)

    assert Repo.get_by(User, email: "foo@bar.com")
  end

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

  test "does not update chosen resource and renders errors when data is invalid", %{conn: conn} do
    volunteer = insert(:volunteer, %{name: "Foo", family_name: "Bar"})
    conn = put conn, volunteer_path(conn, :update, volunteer), %{"user" => %{"email" => "not email"}}
