Tests for password validation