 
     conn = post conn, session_path(conn, :create), user: %{email: user.email, password: "please"}
     assert html_response(conn, 200) =~ "Email or password incorrect"
-    assert get_session(conn, :user_id) == nil
   end
 
 end


    conn = post conn, session_path(conn, :create), user: @valid_attrs
    assert redirected_to(conn) == "/"
    assert get_session(conn, :user_id) == user.id
  end

  test "login fails if email is invalid", %{conn: conn} do


    conn = post conn, session_path(conn, :create), user: %{email: "ooh@rigby.com", password: user.password}
    assert html_response(conn, 200) =~ "Email or password incorrect"
  end

  test "login fails if password is invalid", %{conn: conn} do
