$y[n] = x[n-1]$ is an all pass filter
Your notation is a bit odd, as you are mixing the time-domain with the $z$-domain in the equation you wrote. If you refer to the system

$$y[n]=x[n-1] \quad \mathrm{or} \quad Y(z)=z^{-1}X(z)$$

then you are correct. To put it mathematically, the transfer function of the filter would be:

$$H(z)=\frac{Y(z)}{X(z)}=\frac{1}{z}$$

The frequency response is then

$$H(z) \Bigg|_{z=e^{j\omega}} =\frac{1}{e^{j\omega}}$$

You can see that the magnitude of $H(e^{j\omega})$ is $1$ for all frequencies. Therefore, it is an all-pass system.