Is the wiki page for the Sobolev inequality correct?
Let $p$, so that $1 \leq p < \infty$ and $\Omega$ a subset with at least one bound. There then exists a constant $C$, depending only on $\Omega$ and $p$, so that, for every function $u$ of $W_0^{1,p}$, $$ \|u\|_{L^{p} (\Omega)} \leq C \| \nabla u \|_{L^{p} (\Omega)}.$$
One can easily make the counterexample of $u \equiv 1$ on the interval $(0,1)$, which has gradient identically 0.
Your function $u$ satisfies $u \in W^{1,p}(0,1)$, but not $u \in W_0^{1,p}(0,1)$. Indeed, $u$ is continuous and has boundary values $1$. If it would be in $W_0^{1,p}(0,1) \cap C([0,1])$, it would satisfy $u(-1) = u(1) = 0$.