updating user test with test for validateCode, changing how mock is created