Spectral discretization of the NavierStokes problem with mixed boundary conditions